Skip to content

Gh18902 #18903

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

Closed
wants to merge 2 commits into from
Closed

Gh18902 #18903

wants to merge 2 commits into from

Conversation

devnexen
Copy link
Member

No description provided.

@devnexen devnexen marked this pull request as ready for review June 22, 2025 08:16
@devnexen devnexen linked an issue Jun 22, 2025 that may be closed by this pull request
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Nits, but LGTM and this can crash already so a ValueError is OK

ext/ldap/ldap.c Outdated
}

if (ZSTR_LEN(reqoid) == 0) {
zend_argument_value_error(2, "cannot be empty");
Copy link
Member

Choose a reason for hiding this comment

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

And use the zend_argument_must_not_be_empty_error helper when merging up

Suggested change
zend_argument_value_error(2, "cannot be empty");
zend_argument_value_error(2, "must not be empty");

Comment on lines 8 to 12
try {
ldap_exop($conn,null);
} catch (\ValueError $e) {
echo $e->getMessage(), PHP_EOL;
}
Copy link
Member

Choose a reason for hiding this comment

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

Remove this case, as it is covered by the empty string one, and this reduces future churn when passing null becomes a TypeError.

@nielsdos
Copy link
Member

I wonder whether there are more of these kinds of shenanigans in ext/ldap

@Girgias
Copy link
Member

Girgias commented Jun 22, 2025

I wonder whether there are more of these kinds of shenanigans in ext/ldap

Probably, considering earlier this cycle I found a bunch of NULL deref bugs just by staring at the code :|

@devnexen devnexen closed this in 2694eb9 Jun 22, 2025
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.

assertion failure ldap_extended_operation_s
3 participants