httpd icon indicating copy to clipboard operation
httpd copied to clipboard

Fix a possible null pointer dereference in ap_expr_parse()

Open zhou1615 opened this issue 3 years ago • 0 comments

In ap_expr_parse(), ap_expr_yylex_init() will return 1 on failure, and ctx.scanner will remain NULL. However the return value of ap_expr_yylex_init() is not checked, and there is a dereference of ctx.scanner in following function ap_expr_yyset_extra(), which may lead to NULL pointer dereference.

Fix this bug by adding return value check of ap_expr_yylex_init.

zhou1615 avatar Apr 07 '22 16:04 zhou1615