]> git.kaiwu.me - nginx.git/commit
Fixed segfault if regex studies list allocation fails.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 18 Apr 2023 03:28:46 +0000 (06:28 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 18 Apr 2023 03:28:46 +0000 (06:28 +0300)
commit25c546ac37ba622b93c1a7075bd7eb447bac17b2
tree74845e541d12e9ce26120157abd68d4411c3799c
parent431b302d34333f01bdc334bd1970d5d4aceb5605
Fixed segfault if regex studies list allocation fails.

The rcf->studies list is unconditionally accessed by ngx_regex_cleanup(),
and this used to cause NULL pointer dereference if allocation
failed.  Fix is to set cleanup handler only when allocation succeeds.
src/core/ngx_regex.c