mirror of
https://github.com/QuasarApp/zip.git
synced 2025-04-29 13:54:35 +00:00
Fix crash in zip_entry_size and zip_entry_crc32 (#54)
This commit is contained in:
parent
243948551e
commit
fef7f11b89
@ -524,11 +524,11 @@ int zip_entry_isdir(struct zip_t *zip) {
|
||||
}
|
||||
|
||||
unsigned long long zip_entry_size(struct zip_t *zip) {
|
||||
return zip->entry.uncomp_size;
|
||||
return zip ? zip->entry.uncomp_size : 0;
|
||||
}
|
||||
|
||||
unsigned int zip_entry_crc32(struct zip_t *zip) {
|
||||
return zip->entry.uncomp_crc32;
|
||||
return zip ? zip->entry.uncomp_crc32 : 0;
|
||||
}
|
||||
|
||||
int zip_entry_write(struct zip_t *zip, const void *buf, size_t bufsize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user