diff options
Diffstat (limited to 'src/lib/libc/stdlib/malloc.c')
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 07c73ca774..ecac7ddfe9 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc.c,v 1.220 2017/04/10 05:45:02 otto Exp $ */ | 1 | /* $OpenBSD: malloc.c,v 1.221 2017/04/13 18:32:55 otto Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> | 3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> |
4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> | 4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> |
@@ -1340,15 +1340,15 @@ ofree(struct dir_info *argpool, void *p, int clear, int check, size_t argsz) | |||
1340 | uint32_t chunknum = | 1340 | uint32_t chunknum = |
1341 | find_chunknum(pool, r, p, 0); | 1341 | find_chunknum(pool, r, p, 0); |
1342 | 1342 | ||
1343 | if (info->bits[info->offset + chunknum] != | 1343 | if (info->bits[info->offset + chunknum] < |
1344 | argsz) | 1344 | argsz) |
1345 | wrterror(pool, "recorded old size %hu" | 1345 | wrterror(pool, "recorded old size %hu" |
1346 | " != %zu", | 1346 | " < %zu", |
1347 | info->bits[info->offset + chunknum], | 1347 | info->bits[info->offset + chunknum], |
1348 | argsz); | 1348 | argsz); |
1349 | } | 1349 | } |
1350 | } else if (argsz != sz - mopts.malloc_guard) | 1350 | } else if (sz - mopts.malloc_guard < argsz) |
1351 | wrterror(pool, "recorded old size %zu != %zu", | 1351 | wrterror(pool, "recorded old size %zu < %zu", |
1352 | sz - mopts.malloc_guard, argsz); | 1352 | sz - mopts.malloc_guard, argsz); |
1353 | } | 1353 | } |
1354 | if (sz > MALLOC_MAXCHUNK) { | 1354 | if (sz > MALLOC_MAXCHUNK) { |