[PATCH] snowball: fix potential NULL dereference
m.korotkov@postgrespro.ru
From: Коротков Максим <m.korotkov@postgrespro.ru>
To: pgsql-hackers@postgresql.org
Date: 2025-02-11T08:52:29Z
Lists: pgsql-hackers
Attachments
- 0001-snowball-fix-potential-NULL-dereference.patch (text/x-patch) patch 0001
Hi all, I found the case of potential NULL pointer dereference. In snowball/libstemmer/api.c if we transfer control to the SN_create_env() function by using the error label when there is a memory allocation error of z->p or z->S, we can then dereference the NULL pointer z->S in the function SN_close_env(). Added the pointer check for avoiding a potential problem. --- Best regards, Korotkov Maksim PostgresPro m.korotkov@postgrespro.ru
Commits
-
Avoid null pointer dereference crash after OOM in Snowball stemmers.
- 8388cae5526b 14.18 landed
- 197427fb3f0b 13.21 landed
- c0c364fa1609 16.9 landed
- 9c46d902b209 15.13 landed
- 7edd2cbc535c 17.5 landed
-
Update to latest Snowball sources.
- b464e51ab32f 18.0 landed