mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 02:41:08 +00:00
util/print: fix a heap overflow when len is not a multiple of step
This commit is contained in:
parent
efa0ae88df
commit
4003e6b8ae
@ -540,6 +540,7 @@ R_API void r_print_hexdump(RPrint *p, ut64 addr, const ut8 *buf, int len, int ba
|
||||
int last_sparse = 0;
|
||||
const char *a, *b;
|
||||
|
||||
len = len - (len % step);
|
||||
if (p) {
|
||||
pairs = p->pairs;
|
||||
use_sparse = p->flags & R_PRINT_FLAGS_SPARSE;
|
||||
|
Loading…
Reference in New Issue
Block a user