Skip to content

Fixed empty string crash#4

Closed
vsergeenko777 wants to merge 1 commit into
Mellnik:devfrom
vsergeenko777:patch-1
Closed

Fixed empty string crash#4
vsergeenko777 wants to merge 1 commit into
Mellnik:devfrom
vsergeenko777:patch-1

Conversation

@vsergeenko777

Copy link
Copy Markdown

This code will crash the server:

new fmt_str[128 + 1];
hex_encode("", fmt_str); // crash
sha256("", fmt_str); // crash
whirlpool("", fmt_str); // crash

However, hash functions can return valid values for empty strings. For example, MD5: d41d8cd98f00b204e9800998ecf8427e.

@Mellnik

Mellnik commented Sep 7, 2018

Copy link
Copy Markdown
Owner

Thank you for your pull request. I have incorporated both of you changes into 0.0.5 (dev branch).
Everyone feel free to test it out: https://github.com/Mellnik/hash-plugin/releases/tag/0.0.5

@Mellnik Mellnik closed this in 51fa79f Nov 28, 2018
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.

3 participants