unzip/unzip-6.0-sast.patch
Jakub Martisko e5d8e03894 Fix a sast issue (overlapping strcopy)
Resolves: RHEL-44659
2024-11-26 13:49:53 +01:00

12 lines
450 B
Diff

--- a/envargs.c 2005-03-04 03:23:38.000000000 +0100
+++ b/envargs.c 2024-11-26 13:17:22.289650230 +0100
@@ -118,7 +118,7 @@
/* remove escape characters */
while ((argstart = MBSCHR(argstart, '\\')) != (char *)NULL) {
- strcpy(argstart, argstart + 1);
+ memmove(argstart, argstart + 1, strlen(argstart + 1) + 1);
if (*argstart)
++argstart;
}