Skip to content

Commit

Permalink
fix: strcpy() on overlapping memory regions is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Kruse committed Feb 18, 2014
1 parent f080792 commit 516cde6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config.c
Expand Up @@ -191,7 +191,9 @@ trim (char *s)
++s1;

/* Copy finished string */
strcpy (s, s1);
memmove (s, s1, s2 - s1);
s[s2 - s1 + 1] = '\0';

return s;
}

Expand Down

0 comments on commit 516cde6

Please sign in to comment.