Skip to content

Commit

Permalink
check pState->m_pFile
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-- authored and thabetx committed Sep 7, 2023
1 parent 809c0c9 commit 5b51fa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ static ssize_t zip_entries_delete_mark(struct zip_t *zip,
mz_zip_internal_state *pState = zip->archive.m_pState;
zip->archive.m_zip_mode = MZ_ZIP_MODE_WRITING;

if (MZ_FSEEK64(pState->m_pFile, 0, SEEK_SET)) {
if ((!pState->m_pFile) || MZ_FSEEK64(pState->m_pFile, 0, SEEK_SET)) {
CLEANUP(deleted_entry_flag_array);
return ZIP_ENOENT;
}
Expand Down

0 comments on commit 5b51fa1

Please sign in to comment.