mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 13:47:47 +00:00
epee: fix array underflow in unicode parsing
Reported by minerscan Also independently found by OSS-Fuzz just recently
This commit is contained in:
parent
93257997bd
commit
3721d5688f
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ namespace misc_utils
|
|||
uint32_t dst = 0;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
const unsigned char tmp = isx[(int)*++it];
|
||||
const unsigned char tmp = isx[(unsigned char)*++it];
|
||||
CHECK_AND_ASSERT_THROW_MES(tmp != 0xff, "Bad Unicode encoding");
|
||||
dst = dst << 4 | tmp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue