]> granicus.if.org Git - sudo/commitdiff
Remove bogus optimization that could lead to a double free of the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 16 Mar 2012 16:00:32 +0000 (12:00 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 16 Mar 2012 16:00:32 +0000 (12:00 -0400)
group list.

plugins/sudoers/set_perms.c

index 50d0aaba928aedaac16b7367d5eaf7f5e9fcbb19..dcedba6488e463b2756a8cb8d05ddb008806edf1 100644 (file)
@@ -132,8 +132,6 @@ set_perms(int perm)
            goto bad;
        }
        ostate = &perm_stack[perm_stack_depth - 1];
-       if (memcmp(state, ostate, sizeof(*state)) == 0)
-           goto done;
     }
 
     switch (perm) {
@@ -449,8 +447,6 @@ set_perms(int perm)
            goto bad;
        }
        ostate = &perm_stack[perm_stack_depth - 1];
-       if (memcmp(state, ostate, sizeof(*state)) == 0)
-           goto done;
     }
 
     switch (perm) {
@@ -816,8 +812,6 @@ set_perms(int perm)
            goto bad;
        }
        ostate = &perm_stack[perm_stack_depth - 1];
-       if (memcmp(state, ostate, sizeof(*state)) == 0)
-           goto done;
     }
 
     switch (perm) {
@@ -1105,8 +1099,6 @@ set_perms(int perm)
            goto bad;
        }
        ostate = &perm_stack[perm_stack_depth - 1];
-       if (memcmp(state, ostate, sizeof(*state)) == 0)
-           goto done;
     }
 
     /*
@@ -1390,8 +1382,6 @@ set_perms(int perm)
            goto bad;
        }
        ostate = &perm_stack[perm_stack_depth - 1];
-       if (memcmp(state, ostate, sizeof(*state)) == 0)
-           goto done;
     }
 
     switch (perm) {