[PATCH] snowball: fix potential NULL dereference

From: Коротков Максим <m(dot)korotkov(at)postgrespro(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] snowball: fix potential NULL dereference
Date: 2025-02-11 08:52:29
Message-ID: 1d1a46-67ab1000-21-80c451@83151435
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(dot)korotkov(at)postgrespro(dot)ru

Attachment Content-Type Size
0001-snowball-fix-potential-NULL-dereference.patch text/x-patch 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2025-02-11 08:59:43 Re: RFC: Allow EXPLAIN to Output Page Fault Information
Previous Message Bertrand Drouvot 2025-02-11 08:51:15 Re: Track the amount of time waiting due to cost_delay