diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-09-09 02:36:42 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-09-09 02:36:42 +0900 |
commit | cb9021933010823e97114e40c02cd2cef8d78d8f (patch) | |
tree | 0bca7e85536a30aaeaf4254c557583d72296bd79 /beos/beos.c | |
parent | 5396c5e853e76507fac47181b14b25adb725f628 (diff) | |
download | zip-cb9021933010823e97114e40c02cd2cef8d78d8f.tar.gz zip-cb9021933010823e97114e40c02cd2cef8d78d8f.tar.bz2 zip-cb9021933010823e97114e40c02cd2cef8d78d8f.zip |
tizen 2.3.1 releasetizen_2.3.1_releasesubmit/tizen_2.3.1/20150915.101111tizen_2.3.1
Diffstat (limited to 'beos/beos.c')
-rw-r--r-- | beos/beos.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/beos/beos.c b/beos/beos.c index d64cbb3..d8d16df 100644 --- a/beos/beos.c +++ b/beos/beos.c @@ -1,7 +1,7 @@ /* - Copyright (c) 1990-2005 Info-ZIP. All rights reserved. + Copyright (c) 1990-2002 Info-ZIP. All rights reserved. - See the accompanying file LICENSE, version 2004-May-22 or later + See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html @@ -283,8 +283,9 @@ iztimes *t; /* return value: access, modific. and creation times */ a file size of -1 */ { struct stat s; /* results of stat() */ + /* convert FNAMX to malloc - 11/8/04 EG */ char *name; - unsigned int len = strlen(f); + int len = strlen(f); if (f == label) { if (a != NULL) @@ -295,7 +296,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"); } @@ -315,6 +315,7 @@ iztimes *t; /* return value: access, modific. and creation times */ free(name); return 0; } + free(name); if (a != NULL) { *a = ((ulg)s.st_mode << 16) | !(s.st_mode & S_IWRITE); @@ -330,8 +331,6 @@ iztimes *t; /* return value: access, modific. and creation times */ t->ctime = s.st_mtime; /* best guess (s.st_ctime: last status change!) */ } - free(name); - return unix2dostime(&s.st_mtime); } |