diff options
author | Pierre Joye <pajoye@php.net> | 2006-11-03 16:46:19 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2006-11-03 16:46:19 +0000 |
commit | 8ad0c6d543f5161c5a42536002884a30c153fefd (patch) | |
tree | 961388a6f097141242ea3c8744a4c1d1c77be72b /ext/zip/lib/zip_stat_index.c | |
parent | c002606a8888a0b85b7095c8809b136a815e0bab (diff) | |
download | php-git-8ad0c6d543f5161c5a42536002884a30c153fefd.tar.gz |
- MFH:
- fix possible leak in statName and statIndex
- add addEmptyDir() method
- add zip_stat_init,zip_clear_error and zip_file_clear_error
- add tests
- Fix protos (Hannes)
- setComment return value on success (Hannes)
Diffstat (limited to 'ext/zip/lib/zip_stat_index.c')
-rw-r--r-- | ext/zip/lib/zip_stat_index.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zip/lib/zip_stat_index.c b/ext/zip/lib/zip_stat_index.c index 837d639077..bab79a74ba 100644 --- a/ext/zip/lib/zip_stat_index.c +++ b/ext/zip/lib/zip_stat_index.c @@ -67,8 +67,7 @@ zip_stat_index(struct zip *za, int index, int flags, struct zip_stat *st) _zip_error_set(&za->error, ZIP_ER_INVAL, 0); return -1; } - - st->index = index; + st->crc = za->cdir->entry[index].crc; st->size = za->cdir->entry[index].uncomp_size; st->mtime = za->cdir->entry[index].last_mod; @@ -87,6 +86,7 @@ zip_stat_index(struct zip *za, int index, int flags, struct zip_stat *st) /* st->bitflags = za->cdir->entry[index].bitflags; */ } + st->index = index; st->name = name; return 0; |