summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extract/src/memento.c')
-rw-r--r--extract/src/memento.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/extract/src/memento.c b/extract/src/memento.c
index e62744be..e991b29b 100644
--- a/extract/src/memento.c
+++ b/extract/src/memento.c
@@ -1448,7 +1448,10 @@ int Memento_listBlocksNested(void)
size_t end = (b->rawsize < MEMENTO_PTRSEARCH ? b->rawsize : MEMENTO_PTRSEARCH);
size_t z;
VALGRIND_MAKE_MEM_DEFINED(p, end);
- end -= sizeof(void *)-1;
+ if (end > sizeof(void *)-1)
+ end -= sizeof(void *)-1;
+ else
+ end = 0;
for (z = MEMENTO_SEARCH_SKIP; z < end; z += sizeof(void *)) {
void *q = *(void **)(&p[z]);
void **r;