-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No check if "yyscanner" variable has not been initialized in yylex_init() #1674
Comments
@plusvic it's important to do a full cleanup on In b47b60d you added a retcode check and Lines 738 to 745 in 2d22a4a
Lines 898 to 907 in 2d22a4a
|
… to NULL. As @1ndahous3 highlighted in #1674, not setting the pointer to NULL leads to a dangling pointer.
… to NULL. As @1ndahous3 highlighted in #1674, not setting the pointer to NULL leads to a dangling pointer.
yylex_init()
may fail to init theyyscanner
variable due to memory allocation failure and will return 1:yara/libyara/lexer.c
Lines 3279 to 3291 in 2d22a4a
In all
yr_lex_parse_rules_*()
andyr_parse_*()
routines, the retcode isn't saved and/or checked:yara/libyara/hex_lexer.l
Lines 265 to 269 in e1360f6
And later we can get a nulltpr dereference for the
yyscanner
variable:Detected by the Application Verifier (Windows) with the low resource simulation feature:
The text was updated successfully, but these errors were encountered: