Re: [HACKERS] Unlikely-to-happen crash in ecpg driver caused by NULL-pointer check not done

2015-02-05 Thread Michael Meskes
On Tue, Feb 03, 2015 at 10:44:17PM +0900, Michael Paquier wrote: All those things are addressed in the patch attached. Fixed a typo and commited. Thanks Michael for fixing and Heikki for reviewing. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)

Re: [HACKERS] Unlikely-to-happen crash in ecpg driver caused by NULL-pointer check not done

2015-02-03 Thread Michael Paquier
On Tue, Feb 3, 2015 at 7:50 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Hmm. Since the ecpg_add_mem call is done after setting (*(void **) var), that's left to point to already-free'd memory. The other call sites have a similar issue. I haven't analyzed the code to check if that's

Re: [HACKERS] Unlikely-to-happen crash in ecpg driver caused by NULL-pointer check not done

2015-02-03 Thread Heikki Linnakangas
On 02/03/2015 09:28 AM, Michael Paquier wrote: Hi all, In ecpg_add_mem of memory.c, we use ecpg_alloc but there is actually no NULL-pointer check. If an OOM shows up exactly at this point, this is likely to cause a crash. Attached patch adds some extra processing to ecpg_add_mem to check if the