[coreboot] New patch to review for coreboot: 7bbd6dc Fix strcpy()

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Dec 19 20:44:43 CET 2012


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 7bbd6dc7b6357c76d7de3249d48b65ac9bf117bd
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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/include/string.h b/src/include/string.h
index 708961b..a71bbe4 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -73,6 +73,7 @@ static inline void strcpy(char *dst, const char *src)
 {
 	while (*src)
 		*dst++ = *src++;
+	*dst = '\0';
 }
 
 static inline int strcmp(const char *s1, const char *s2)



More information about the coreboot mailing list