search for: a8930b548048

Displaying 1 result from an estimated 1 matches for "a8930b548048".

2007 Jan 05
1
[PATCH] Re: [Xen-staging] [xen-unstable] [XEN] Avoid use of GNU-specific memmem().
...p - (char *)h) <= (hlen - nlen); p++) > + if (!memcmp(p, n, nlen)) return p; > + return NULL; > +} size_t is unsigned, (hlen - nlen) can wrap and cause a segfault. The patch below fixes it. Thanks, Alex Signed-off-by: Alex Williamson <alex.williamson@hp.com> --- diff -r a8930b548048 xen/tools/symbols.c --- a/xen/tools/symbols.c Fri Jan 05 14:36:55 2007 -0700 +++ b/xen/tools/symbols.c Fri Jan 05 14:58:21 2007 -0700 @@ -353,7 +353,7 @@ static void *memmem_pvt(void *h, size_t static void *memmem_pvt(void *h, size_t hlen, void *n, size_t nlen) { char *p; - for (p = h; (p - (c...