ctags/SOURCES/ctags-5.8-memmove.patch
2021-10-08 10:20:00 +00:00

20 lines
590 B
Diff

diff -r -u ctags-5.8.orig/routines.c ctags-5.8/routines.c
--- ctags-5.8.orig/routines.c 2013-06-13 10:42:08.048576327 -0400
+++ ctags-5.8/routines.c 2013-06-13 10:48:25.150366836 -0400
@@ -757,13 +757,13 @@
else if (cp [0] != PATH_SEPARATOR)
cp = slashp;
#endif
- strcpy (cp, slashp + 3);
+ memmove (cp, slashp + 3, strlen(slashp + 3) + 1);
slashp = cp;
continue;
}
else if (slashp [2] == PATH_SEPARATOR || slashp [2] == '\0')
{
- strcpy (slashp, slashp + 2);
+ memmove (slashp, slashp + 2, strlen(slashp + 2) + 1);
continue;
}
}