From 0d348f919cc19841e76762be1c42c4c2737bd268 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 6 Mar 2009 17:43:20 +0000 Subject: fix strstr. Seems the function never worked before, except the searched substring is at the end. Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3978 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/libpayload/libc/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads') diff --git a/payloads/libpayload/libc/string.c b/payloads/libpayload/libc/string.c index b9ecb907f6..ec6be1dfb4 100644 --- a/payloads/libpayload/libc/string.c +++ b/payloads/libpayload/libc/string.c @@ -234,7 +234,7 @@ char *strstr(const char *h, const char *n) 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; -- cgit v1.2.3