From e66a87c2e4298d9aef725f67d69eec2728f4aeca Mon Sep 17 00:00:00 2001 From: mquinson Date: Sun, 29 Apr 2007 11:36:01 +0000 Subject: [PATCH] Do not call strcpy but memmove since both zone may overlap. Thanks valgrind for reporting git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3468 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/xbt_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xbt/xbt_str.c b/src/xbt/xbt_str.c index 11a50b8fe4..973ac6a47b 100644 --- a/src/xbt/xbt_str.c +++ b/src/xbt/xbt_str.c @@ -108,7 +108,7 @@ xbt_str_ltrim( char* s, const char* char_list) while(*cur && white_char[(unsigned char)*cur]) ++cur; - return strcpy(s,cur); + return memmove(s,cur, strlen(cur)); } /** @brief Strip whitespace (or other characters) from the end and the begining of a string. -- 2.20.1