From: otto Date: Thu, 6 Apr 2017 08:39:47 +0000 (+0000) Subject: first print size in meta-data then supplied arg size when an inconsistency is X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8104fd63ba39a49152b7ce2deea91fbf2fc84fb2;p=openbsd first print size in meta-data then supplied arg size when an inconsistency is detected wrt recallocarray() --- 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)