Author: stepan Date: 2009-03-06 18:43:20 +0100 (Fri, 06 Mar 2009) New Revision: 3978
Modified: trunk/payloads/libpayload/libc/string.c Log: fix strstr. Seems the function never worked before, except the searched substring is at the end.
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/payloads/libpayload/libc/string.c =================================================================== --- trunk/payloads/libpayload/libc/string.c 2009-03-06 17:24:29 UTC (rev 3977) +++ trunk/payloads/libpayload/libc/string.c 2009-03-06 17:43:20 UTC (rev 3978) @@ -234,7 +234,7 @@ int i;
for (i = 0; i <= hn - nn; i++) - if (!strcmp(&h[i], n)) + if (!memcmp(&h[i], n, nn)) return (char *)&h[i];
return NULL;