mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-01 19:23:04 +00:00
Fix large allocation bug in wasm parser ##fuzz
This commit is contained in:
parent
dc9f7df3bd
commit
3df30c7e9e
@ -423,7 +423,9 @@ static inline RPVector *parse_vec(RBinWasmObj *bin, ut64 bound, ParseEntryFcn pa
|
||||
if (!consume_u32_r (buf, bound, &count)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (count > r_buf_size (buf)) {
|
||||
count = r_buf_size (buf) - r_buf_tell (buf);
|
||||
}
|
||||
RPVector *vec = r_pvector_new (free_entry);
|
||||
if (vec) {
|
||||
r_pvector_reserve (vec, count);
|
||||
|
Loading…
x
Reference in New Issue
Block a user