Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I/O problems in fuzzers #409

Merged
merged 3 commits into from
Sep 22, 2023
Merged

I/O problems in fuzzers #409

merged 3 commits into from
Sep 22, 2023

Conversation

nmlsg
Copy link
Contributor

@nmlsg nmlsg commented Sep 22, 2023

Hello,

I've tested your repository and noticed that it generates numerous .zip archives (specifically in the zip_read_file_fuzzer function) due to the absence of file deletion in certain if statements used for logging purposes.

For instance, in the code snippet:

if (source == NULL) {
    printf("failed to create source buffer. %s\n", zip_strerror(archive));
    return -1;
}

I suggest modifying it to:

if (source == NULL) {
    std::remove(path.c_str());
    printf("failed to create source buffer. %s\n", zip_strerror(archive));
    return -1;
}

This adjustment will ensure that any failed file creations are followed by the deletion of the associated files. Without this modification, multiple .zip archives may accumulate without being deleted.

Thank you for your attention to this matter.

@0-wiz-0 0-wiz-0 merged commit 5c10c39 into nih-at:main Sep 22, 2023
1 of 2 checks passed
@0-wiz-0
Copy link
Member

0-wiz-0 commented Sep 22, 2023

Thank you, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants