From 57895cdc764809ad29336431ee6b43c68fe15f15 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Wed, 22 Apr 2009 14:07:14 +0000 Subject: Don't leak information via uninitialized space in db(3) records. [09:07] Sanity-check string lengths in order to stop OpenSSL crashing when printing corrupt BMPString or UniversalString objects. [09:08] Security: FreeBSD-SA-09:07.libc Security: FreeBSD-SA-09:08.openssl Security: CVE-2009-0590 Approved by: re (kensmith) Approved by: so (cperciva) --- lib/libc/db/btree/bt_split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/db/btree') diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c index dc2791762af0..94fa15317d8f 100644 --- a/lib/libc/db/btree/bt_split.c +++ b/lib/libc/db/btree/bt_split.c @@ -381,7 +381,7 @@ bt_page(t, h, lp, rp, skip, ilen) } /* Put the new left page for the split into place. */ - if ((l = (PAGE *)malloc(t->bt_psize)) == NULL) { + if ((l = (PAGE *)calloc(1, t->bt_psize)) == NULL) { mpool_put(t->bt_mp, r, 0); return (NULL); } -- cgit v1.3