From 718fd39f10310d10ebc2276021d97d48f1163a88 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 9 Sep 2010 15:29:03 -0700 Subject: Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder ". Jeremy. --- source3/lib/util_unistr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/lib/util_unistr.c') diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index f53ef94d69..4cda38dc19 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -109,6 +109,11 @@ void load_case_tables(void) if (!upcase_table) { DEBUG(1,("creating lame upcase table\n")); upcase_table = (smb_ucs2_t *)SMB_MALLOC(0x20000); + if (!upcase_table) { + smb_panic("lame upcase table malloc fail"); + /* notreached. */ + return; + } for (i=0;i<0x10000;i++) { smb_ucs2_t v; SSVAL(&v, 0, i); @@ -124,6 +129,11 @@ void load_case_tables(void) if (!lowcase_table) { DEBUG(1,("creating lame lowcase table\n")); lowcase_table = (smb_ucs2_t *)SMB_MALLOC(0x20000); + if (!lowcase_table) { + smb_panic("lame lowcase table malloc fail"); + /* notreached. */ + return; + } for (i=0;i<0x10000;i++) { smb_ucs2_t v; SSVAL(&v, 0, i); -- cgit