Skip to content

ext/bz2: Check int params of bzcompress() are correct #16108

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

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Sep 28, 2024

Also add a TODO to check the length of the source strings

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a subtle BC break though, so I'd recommend documenting this in UPGRADING.
Also, shouldn't this be tested?

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact yeah, this needs tests and also existing test changes...

@nielsdos
Copy link
Member

See for example

var_dump(bzcompress($string, 100, -1));

Also add a TODO to check the length of the source strings
@Girgias
Copy link
Member Author

Girgias commented Sep 28, 2024

This is a subtle BC break though, so I'd recommend documenting this in UPGRADING. Also, shouldn't this be tested?

I wanted to make this a draft as I was having dinner.
But I should have addressed the issues.

@Girgias Girgias merged commit d4c88a2 into php:master Sep 28, 2024
9 of 10 checks passed
@Girgias Girgias deleted the bz2-checks branch September 28, 2024 21:38
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Oct 1, 2024
Also add a TODO to check the length of the source strings
Ayesh added a commit that referenced this pull request Oct 7, 2024
Follow-up to GH-16108, to add the `$` sign to the `work_factor`
paremter mention in the `UPGRADING` file.
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