diff options
-rw-r--r-- | newlib/libc/stdlib/nano-mallocr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/nano-mallocr.c b/newlib/libc/stdlib/nano-mallocr.c index a2b50fa..41e69ab 100644 --- a/newlib/libc/stdlib/nano-mallocr.c +++ b/newlib/libc/stdlib/nano-mallocr.c @@ -396,7 +396,7 @@ void * nano_malloc(RARG malloc_size_t s) *(long *)((char *)r + offset) = -offset; } - assert(align_ptr + size <= (char *)r + alloc_size); + assert(align_ptr + s <= (char *)r + alloc_size); return align_ptr; } #endif /* DEFINE_MALLOC */ |