From d2e0a7e0faaac8f54c46cf5b6393bc664b95fd9e Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 12 Sep 2016 22:06:58 +0200 Subject: [PATCH] Fix 'Cannot allocate issue via rap:// --- libr/io/io.c | 1 - libr/io/p/io_rap.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libr/io/io.c b/libr/io/io.c index 02a15e920f..5fb1a8f49d 100644 --- a/libr/io/io.c +++ b/libr/io/io.c @@ -993,7 +993,6 @@ static ut8 *r_io_desc_read(RIO *io, RIODesc *desc, ut64 *out_sz) { if (!io || !desc || !out_sz) { return NULL; } - if (*out_sz == UT64_MAX) { *out_sz = r_io_desc_size (io, desc); } diff --git a/libr/io/p/io_rap.c b/libr/io/p/io_rap.c index 31cbf782b1..ccde16a5ba 100644 --- a/libr/io/p/io_rap.c +++ b/libr/io/p/io_rap.c @@ -118,7 +118,7 @@ static ut64 rap__lseek(RIO *io, RIODesc *fd, ut64 offset, int whence) { eprintf ("Unexpected lseek reply\n"); return -1; } - offset = r_read_at_be64 (tmp + 1, 1); + offset = r_read_at_be64 (tmp, 1); return offset; }