bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk: free_wstr() invalid write


From: Andrew J. Schorr
Subject: Re: gawk: free_wstr() invalid write
Date: Mon, 18 Dec 2006 11:03:30 -0500
User-agent: Mutt/1.4.2.1i

On Mon, Dec 18, 2006 at 06:27:52PM +0300, Dmitry V. Levin wrote:
> free_wstr() zeroes wstptr and wstlen pointers even if WSTRCUR flag is not
> set, which is wrong and may lead to invalid write, similar to invalid free
> in str2wstr().
> 
> Proposed fix is attached.

FYI, your str2str and free_wstr patches seem correct to me,
and they resemble the code in the xgawk source tree:

   http://sourceforge.net/projects/xmlgawk/

In particular:

   http://xmlgawk.cvs.sourceforge.net/xmlgawk/xmlgawk/node.c?revision=1.5

(except the 'free_wstr' function is named 'release_wstr' in xgawk
at the moment).

Regards,
Andy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]