diff options
Diffstat (limited to 'gdb/source.c')
-rw-r--r-- | gdb/source.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/source.c b/gdb/source.c index cfdf81b..97f5d46 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -588,7 +588,7 @@ add_path (char *dirname, char **which_path, int parse_separators) p--; /* Back over leading separator. */ if (prefix > p - *which_path) goto skip_dup; /* Same dir twice in one cmd. */ - strcpy (p, &p[len + 1]); /* Copy from next \0 or : */ + memmove (p, &p[len + 1], strlen (&p[len + 1]) + 1); /* Copy from next \0 or : */ } p = strchr (p, DIRNAME_SEPARATOR); if (p != 0) |