Fix size arg when realloc()ing include stack. From Daniel Kopecek

This commit is contained in:
Todd C. Miller
2010-02-13 07:31:38 -05:00

2
toke.l
View File

@@ -865,7 +865,7 @@ _push_include(path, isdir)
} }
istacksize += SUDOERS_STACK_INCREMENT; istacksize += SUDOERS_STACK_INCREMENT;
istack = (struct include_stack *) realloc(istack, istack = (struct include_stack *) realloc(istack,
sizeof(istack) * istacksize); sizeof(*istack) * istacksize);
if (istack == NULL) { if (istack == NULL) {
yyerror("unable to allocate memory"); yyerror("unable to allocate memory");
return(FALSE); return(FALSE);