Skip to content

Conversation

@nielsdos
Copy link
Member

Reported by OpenAI AARDVARK.

@nielsdos nielsdos requested a review from devnexen April 15, 2025 22:30
@devnexen
Copy link
Member

devnexen commented Apr 15, 2025

The change itself look correct for sure but can you tell me what it s fixing ? at first sight, the change seems pointless.

@nielsdos
Copy link
Member Author

php_zip_parse_option is only called when options are passed to the function. Prior to this patch, php_zip_parse_option was responsible for zeroing the opts variable. So in the case when php_zip_parse_option is not called, opts remains uninitialized yet it is being used anyway.
By just always zeroing opts at declaration time, we avoid this issue and we are unlikely to reintroduce this in the future.

@devnexen
Copy link
Member

ah my bad, I did not unfold the full function :)

@nielsdos nielsdos closed this in 0a6326c Apr 16, 2025
@nielsdos
Copy link
Member Author

ah my bad, I did not unfold the full function :)

To be fair, I should've added that description in my commit/PR description itself. I've added it in the commit during merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants