From: SourceForge.net <no...@so...> - 2005-02-20 05:12:00
|
Patches item #1029580, was opened at 2004-09-16 20:09 Message generated for change (Settings changed) made by ballie01 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1029580&group_id=16528 Category: None Group: None Status: Pending >Resolution: Fixed Priority: 8 Submitted By: Jey Kottalam (jeyk) Assigned to: Nobody/Anonymous (nobody) Summary: serious bug: unQuoteBytea allocates buffer that is too small Initial Comment: In the case where unQuoteBytea is called with a string that has no escaped characters, and unQuoteBytea behaves like strcpy() to simply copy all the bytes in the original string unmodified to the destination string, the buffer is too small by one char. The buffer allocated has the size strlen(sin) when it should have the size strlen(sin)+1 to account for the terminating NUL byte in C strings. I have attached a patch to correct this problem. It caused me a lot of pain with strange, semi-random seeming bugs in my program. :-) ---------------------------------------------------------------------- Comment By: Billy G. Allie (ballie01) Date: 2005-02-19 23:48 Message: Logged In: YES user_id=8500 Applied fix. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316528&aid=1029580&group_id=16528 |