]> granicus.if.org Git - sudo/commitdiff
Fix size arg when realloc()ing include stack. From Daniel Kopecek
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 9 Feb 2010 13:28:03 +0000 (08:28 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 9 Feb 2010 13:28:03 +0000 (08:28 -0500)
--HG--
branch : 1.7

toke.l

diff --git a/toke.l b/toke.l
index 23f70f9b0d87089021bc54594164343dd7e62dc3..1d5bb8c8cf850a4966f06360de5cc53516f82fb7 100644 (file)
--- a/toke.l
+++ b/toke.l
@@ -865,7 +865,7 @@ _push_include(path, isdir)
        }
        istacksize += SUDOERS_STACK_INCREMENT;
        istack = (struct include_stack *) realloc(istack,
-           sizeof(istack) * istacksize);
+           sizeof(*istack) * istacksize);
        if (istack == NULL) {
            yyerror("unable to allocate memory");
            return(FALSE);