Commit 6327d67b authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

crypto: fix assert() on malformed hex input

Use the StringBytes::IsValidString() function introduced in commit
dce26cce to ensure that the input string meets the expectations of the
other StringBytes functions before processing it further.

Fixes the following assertion:

    Assertion failed: (str->Length() % 2 == 0 && "invalid hex string
    length"), function StorageSize, file ../../src/string_bytes.cc,
    line 301.

Fixes #5725.
parent dce26cce
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment