Skip to content

Commit

Permalink
Fix wrong return check of rz_io_nread_at (#4006)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeiweiHu authored Nov 28, 2023
1 parent fce44a2 commit 3d4e4b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions librz/core/linux_heap_glibc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,8 +1182,8 @@ RZ_API RzList /*<RzHeapBin *>*/ *GH(rz_heap_tcache_content)(RzCore *core, GHT ar
GHT tcache_fd = entry;
GHT tcache_tmp = GHT_MAX;
for (size_t n = 1; n < count; n++) {
bool r = rz_io_nread_at(core->io, tcache_fd, (ut8 *)&tcache_tmp, sizeof(GHT));
if (!r) {
int r = rz_io_nread_at(core->io, tcache_fd, (ut8 *)&tcache_tmp, sizeof(GHT));
if (r <= 0) {
goto error;
}
tcache_tmp = GH(get_next_pointer)(core, tcache_fd, tcache_tmp);
Expand Down

0 comments on commit 3d4e4b0

Please sign in to comment.