[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] [patch #7078] fix potential string overflows in 0.1.2.6
From: |
Petr Hluzin |
Subject: |
[Simulavr-devel] [patch #7078] fix potential string overflows in 0.1.2.6 |
Date: |
Sun, 31 Jan 2010 12:41:29 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 |
Follow-up Comment #1, patch #7078 (project simulavr):
Nice catch. (Oh those pesky C string functions. How difficult to get right.
And how boring.)
However the strncat() copies the specified number of bytes _plus_ NUL byte.
See wikipedia http://en.wikipedia.org/wiki/Strcat#strncat
"Common mistakes are..."
In the original patch it overwrites one byte. This new one does not, I hope.
(file #19585)
_______________________________________________________
Additional Item Attachment:
File name: happy_gcc_v2.patch Size:2 KB
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7078>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/