summaryrefslogtreecommitdiffstats
path: root/tools/include/nolibc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/include/nolibc')
-rw-r--r--tools/include/nolibc/stdlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/stdlib.h b/tools/include/nolibc/stdlib.h
index bacfd35c51..5be9d3c743 100644
--- a/tools/include/nolibc/stdlib.h
+++ b/tools/include/nolibc/stdlib.h
@@ -185,7 +185,7 @@ void *realloc(void *old_ptr, size_t new_size)
if (__builtin_expect(!ret, 0))
return NULL;
- memcpy(ret, heap->user_p, heap->len);
+ memcpy(ret, heap->user_p, user_p_len);
munmap(heap, heap->len);
return ret;
}