From 0f98e8ab83b474cba8696aed3abbb64d38f25b95 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 11 Nov 2003 19:22:44 +0000 Subject: fix crash bug due to empyrt munged dial string; patch from metze (This used to be commit aef7f54355a71e36963ed7427e9c2f05d26cc222) --- source3/rpc_parse/parse_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index b0144c2c89..cd59d390aa 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -1044,7 +1044,7 @@ void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) str->uni_max_len = str->uni_str_len; str->offset = 0; str->buffer = (uint16 *) memdup(blob->data, blob->length); - if (!str->buffer) { + if ((str->buffer == NULL) && (blob->length > 0)) { smb_panic("init_unistr2_from_datablob: malloc fail\n"); } } -- cgit