This commit is contained in:
condret 2015-04-10 13:11:18 +02:00
parent 61202e5201
commit d619c9efc6

View File

@ -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;