Commit 10bf497c authored by topjohnwu's avatar topjohnwu

Critical bug fix! Reset allocated memory

This bus has been there for a long time.
memset the newly allocated memory to prevent issues.
parent 76eb629f
......@@ -60,6 +60,7 @@ static int add_irule(int s, int t, int c, int p, int effect, int not) {
if (av == NULL) {
av = cmalloc(sizeof(*av));
memset(av, 0, sizeof(*av));
av->data |= 1U << (p - 1);
int ret = avtab_insert(&policy->te_avtab, &key, av);
if (ret) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment