diff options
author | ache <ache@FreeBSD.org> | 2004-12-02 04:14:18 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2004-12-02 04:14:18 +0800 |
commit | 9e069b12962c978b648491a72b0e0acf5028f5ec (patch) | |
tree | f27a491dc2d629a29111b779e1059ba3ebecb29d /archivers/zip/files | |
parent | 3288c9447f3f36026fca185cc7a8ac29e6350ef5 (diff) | |
download | freebsd-ports-gnome-9e069b12962c978b648491a72b0e0acf5028f5ec.tar.gz freebsd-ports-gnome-9e069b12962c978b648491a72b0e0acf5028f5ec.tar.zst freebsd-ports-gnome-9e069b12962c978b648491a72b0e0acf5028f5ec.zip |
Close overflow
Submitted by: simon
Diffstat (limited to 'archivers/zip/files')
-rw-r--r-- | archivers/zip/files/patch-over | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/archivers/zip/files/patch-over b/archivers/zip/files/patch-over new file mode 100644 index 000000000000..ec03a1e132a4 --- /dev/null +++ b/archivers/zip/files/patch-over @@ -0,0 +1,25 @@ +--- zip-2.3/unix/unix.c.orig 2004-11-05 15:44:41.000000000 -0500 ++++ unix/unix.c 2004-11-05 15:50:28.000000000 -0500 +@@ -319,8 +319,8 @@ iztimes *t; /* return value: + a file size of -1 */ + { + struct stat s; /* results of stat() */ +- char name[FNMAX]; +- int len = strlen(f); ++ char *name; ++ size_t len = strlen(f); + + if (f == label) { + if (a != NULL) +@@ -331,6 +331,11 @@ iztimes *t; /* return value: + t->atime = t->mtime = t->ctime = label_utim; + return label_time; + } ++ ++ name = malloc(len+1); ++ if (!name) ++ return 0; ++ + strcpy(name, f); + if (name[len - 1] == '/') + name[len - 1] = '\0'; |