diff options
Diffstat (limited to 'archivers/unarj/files/patch-01-path-unarj.c')
-rw-r--r-- | archivers/unarj/files/patch-01-path-unarj.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/archivers/unarj/files/patch-01-path-unarj.c b/archivers/unarj/files/patch-01-path-unarj.c new file mode 100644 index 000000000000..c727acb2d8d3 --- /dev/null +++ b/archivers/unarj/files/patch-01-path-unarj.c @@ -0,0 +1,25 @@ +--- unarj-2.65.orig/unarj.c ++++ unarj.c +@@ -235,6 +235,8 @@ static UCRC crctable[UCHAR_MAX + 1]; + + /* Functions */ + ++void copy_path_relative(char *dest, char *src, size_t len); ++ + static void + make_crctable() + { +@@ -738,11 +740,11 @@ extract() + + no_output = 0; + if (command == 'E') +- strncopy(name, &filename[entry_pos], sizeof(name)); ++ copy_path_relative(name, &filename[entry_pos], sizeof(name)); + else + { + strcpy(name, DEFAULT_DIR); +- strncopy(name+strlen(name), filename, sizeof(name)-strlen(name)); ++ copy_path_relative(name+strlen(name), filename, sizeof(name)-strlen(name)); + } + + if (host_os != OS) |