-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/hash: Fix GH-16711: Segfault in mhash() #16713
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
Conversation
6b64496
to
4d974b1
Compare
From a quick look, the only affected function is Lines 1211 to 1217 in fde053b
|
I agree with @cmb69. This patch is too complex for a bugfix as it adds more sources of truth (we have to check the algorithm ID and name separately and assert they're consistent). |
4d974b1
to
7fa674b
Compare
IMO okay now. Could also raise a warning or throw an exception – I don't mind, since these functions are deprecated anyway. |
Meh, they return |
It's deprecated anyway, it doesn't make much sense to do more than the bare minimum keeping it working IMHO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
Rewrote part of how it works to handle all cases dealing with the
mhash_to_hash
struct.