Revision: 14907
Author: adrian.chadd
Date: Sun Jul 10 18:31:56 2011
Log: Fix an off-by-one error in memrcmp(). It was comparing bytes 1 ..
n, rather than
0 .. n - 1.
http://code.google.com/p/lusca-cache/source/detail?r=14907
Modified:
/playpen/LUSCA_HEAD_ipv6/lib/util.c
=======================================
--- /playpen/LUSCA_HEAD_ipv6/lib/util.c Sun Jul 4 06:56:53 2010
+++ /playpen/LUSCA_HEAD_ipv6/lib/util.c Sun Jul 10 18:31:56 2011
@@ -744,7 +744,7 @@
int
memrcmp(const void *s1, const void *s2, int n)
{
- const unsigned char *p1 = s1 + n, *p2 = s2 + n;
+ const unsigned char *p1 = s1 + n - 1, *p2 = s2 + n - 1;
if (n == 0)
return (0);
do {
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.