[pcre-dev] [Bug 990] Crash after malloc failure

Top Page

Reply to this message
Author: 990
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 990] Crash after malloc failure
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=990




--- Comment #6 from eleventeen@??? 2010-06-03 17:05:56 ---
(In reply to comment #5)
> I have put the resolution back to FIXED, because I have fixed it. The
> WORKSFORME resolution is meant for bug reports that the maintainer cannot
> reproduce.
>


Sorry if I used WORKSFORME resolution incorrectly (actually I misread it), but
the code is still wrong. You have added two checks:

heapframe *newframe = ...
if (heapframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);\

heapframe *frame = ...
if (frame == NULL) RRETURN(PCRE_ERROR_NOMEMORY);

The second is correct - variable frame is checked. But the first check is
incorrect - variable newframe may be assigned NULL pointer and check doesn't
use that variable.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email