mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Close overflow
Submitted by: simon
This commit is contained in:
parent
dd51751293
commit
d84e0775bb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=122919
@ -8,7 +8,7 @@
|
||||
|
||||
PORTNAME= zip
|
||||
PORTVERSION= 2.3
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= archivers
|
||||
MASTER_SITES= ftp://ftp.uu.net/pub/archiving/zip/src/ \
|
||||
${MASTER_SITE_TEX_CTAN:S,%SUBDIR%,tools/zip/info-zip/src/,}
|
||||
|
25
archivers/zip/files/patch-over
Normal file
25
archivers/zip/files/patch-over
Normal file
@ -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';
|
Loading…
Reference in New Issue
Block a user