[coreboot] Patch set updated for coreboot: 1fc6137 Fix strcpy()
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Thu Jan 3 00:41:44 CET 2013
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2062
-gerrit
commit 1fc61372dc598b11754e2cecb24ba4a118297bcd
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Wed Dec 19 11:22:07 2012 -0800
Fix strcpy()
'nough said. It was broken since 2006.
Change-Id: I312ac07eee65d6bb8567851dd38064c7f51b3bd2
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/include/string.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/include/string.h b/src/include/string.h
index 708961b..44f244c 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -69,10 +69,15 @@ static inline char *strncpy(char *to, const char *from, int count)
return ret;
}
-static inline void strcpy(char *dst, const char *src)
+static inline char *strcpy(char *dst, const char *src)
{
+ char *ptr = dst;
+
while (*src)
*dst++ = *src++;
+ *dst = '\0';
+
+ return ptr;
}
static inline int strcmp(const char *s1, const char *s2)
More information about the coreboot
mailing list