mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 08:49:50 +00:00
fix #2339
This commit is contained in:
parent
61202e5201
commit
d619c9efc6
@ -13,7 +13,10 @@ R_API int r_io_map_count (RIO *io) {
|
||||
|
||||
R_API RIOMap * r_io_map_new(RIO *io, int fd, int flags, ut64 delta, ut64 addr, ut64 size) {
|
||||
RIOMap *map = R_NEW (RIOMap);
|
||||
if (!map) return NULL;
|
||||
if (!map || ((0xffffffffffffffff - size) < addr)) { //prevent interger-overflow
|
||||
free (map);
|
||||
return NULL;
|
||||
}
|
||||
map->fd = fd;
|
||||
map->flags = flags;
|
||||
map->delta = delta;
|
||||
|
Loading…
Reference in New Issue
Block a user