Date: Tue, 28 Apr 2009 19:20:13 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/libc/arm/string strncmp.S Message-ID: <200904281920.n3SJKNK2028451@repoman.freebsd.org>
index | next in thread | raw e-mail
cognet 2009-04-28 19:20:13 UTC
FreeBSD src repository
Modified files:
lib/libc/arm/string strncmp.S
Log:
SVN rev 191633 on 2009-04-28 19:20:13Z by cognet
Change the test at the beginning of strncmp(), from being if (len - 1) < 0
to if (len == 0).
The length is supposed to be unsigned, so len - 1 < 0 won't happen except
if len == 0 anyway, and it would return 0 when it shouldn't, if len was
> INT_MAX.
Spotted out by: Channa <channa kad gmail com>
Revision Changes Path
1.3 +4 -4 src/lib/libc/arm/string/strncmp.S
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904281920.n3SJKNK2028451>
