summaryrefslogtreecommitdiff
path: root/atari/atari.c
diff options
context:
space:
mode:
Diffstat (limited to 'atari/atari.c')
-rw-r--r--atari/atari.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/atari/atari.c b/atari/atari.c
index 9bfb5d1..ce5196c 100644
--- a/atari/atari.c
+++ b/atari/atari.c
@@ -1,10 +1,10 @@
/*
- Copyright (c) 1990-2005 Info-ZIP. All rights reserved.
+ Copyright (c) 1990-1999 Info-ZIP. All rights reserved.
- See the accompanying file LICENSE, version 2004-May-22 or later
+ See the accompanying file LICENSE, version 1999-Oct-05 or later
(the contents of which are also included in zip.h) for terms of use.
If, for some reason, both of these files are missing, the Info-ZIP license
- also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
+ also may be found at: ftp://ftp.cdrom.com/pub/infozip/license.html
*/
#include "zip.h"
@@ -532,8 +532,9 @@ iztimes *t; /* return value: access, modific. and creation times */
a file size of -1 */
{
struct stat s; /* results of stat() */
+ /* convert FNMAX to malloc - 11/8/04 EG */
char *name;
- unsigned int len = strlen(f);
+ int len = strlen(f);
if (f == label) {
if (a != NULL)
@@ -544,7 +545,6 @@ iztimes *t; /* return value: access, modific. and creation times */
t->atime = t->mtime = t->ctime = label_utim;
return label_time;
}
-
if ((name = malloc(len + 1)) == NULL) {
ZIPERR(ZE_MEM, "filetime");
}
@@ -570,6 +570,7 @@ iztimes *t; /* return value: access, modific. and creation times */
/* *a = ((ulg)s.st_mode << 16) | (ulg)GetFileMode(name); */
*a = ((ulg)s.st_mode << 16) | (ulg)s.st_attr;
}
+ free(name);
if (n != NULL)
*n = S_ISREG(s.st_mode) ? s.st_size : -1L;
if (t != NULL) {
@@ -578,8 +579,6 @@ iztimes *t; /* return value: access, modific. and creation times */
t->ctime = s.st_ctime;
}
- free(name);
-
return unix2dostime(&s.st_mtime);
}