[ARM] Fixes for arm str* routines
Richard Earnshaw
rearnsha@arm.com
Thu Mar 12 15:01:00 GMT 2009
Another couple of bugs have been found in the string routines that I
posted recently. The first, fixed by Mark Mitchell, concerns the
thumb-2 compilation of strlen (strings shorter than 4 bytes could
sometimes be reported as being longer than 4 bytes).
The second is a case of an unfortunate (l)user. Anyone unfortunate
enough to have a string that contained 0x80 would find that the routines
treated that as an end-of-string marker, leading to short strings.
Fixed thusly:
2009-03-09 Mark Mitchell <mark@codesourcery.com>
* libc/machine/arm/strlen.c (strlen): Fix defect in Thumb-2 mode.
2009-03-12 Richard Earnshaw <rearnsha@arm.com>
* libc/machine/arm/strlen.c (strlen): Correctly detect
end-of-string.
* libc/machine/arm/strcpy.c (strcpy): Likewise.
* libc/machine/arm/strcmp.c (strcmp, strcmp_unaligned): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strfunc.diff
Type: text/x-patch
Size: 4621 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20090312/f27a27de/attachment.bin>
More information about the Newlib
mailing list