From 8104fd63ba39a49152b7ce2deea91fbf2fc84fb2 Mon Sep 17 00:00:00 2001 From: otto Date: Thu, 6 Apr 2017 08:39:47 +0000 Subject: [PATCH] first print size in meta-data then supplied arg size when an inconsistency is detected wrt recallocarray() --- lib/libc/stdlib/malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 1e13c2de111..f2b8b1549bb 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.218 2017/03/28 16:56:38 otto Exp $ */ +/* $OpenBSD: malloc.c,v 1.219 2017/04/06 08:39:47 otto Exp $ */ /* * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek * Copyright (c) 2012 Matthew Dempsky @@ -1738,8 +1738,8 @@ orecallocarray(struct dir_info *argpool, void *p, size_t oldsize, oldsize); } } else if (oldsize != sz - mopts.malloc_guard) - wrterror(pool, "recorded old size %zu != %zu", oldsize, - sz - mopts.malloc_guard); + wrterror(pool, "recorded old size %zu != %zu", + sz - mopts.malloc_guard, oldsize); newptr = omalloc(pool, newsize, 0, f); if (newptr == NULL) -- 2.20.1