summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-11-11 19:22:44 +0000
committerGerald Carter <jerry@samba.org>2003-11-11 19:22:44 +0000
commit0f98e8ab83b474cba8696aed3abbb64d38f25b95 (patch)
tree9464a11c6ab9d7d1cabeeb04d31c2137b0c98719
parent912289bd489f70eea345d89dff32f03bd8b8916b (diff)
downloadsamba-0f98e8ab83b474cba8696aed3abbb64d38f25b95.tar.gz
samba-0f98e8ab83b474cba8696aed3abbb64d38f25b95.tar.bz2
samba-0f98e8ab83b474cba8696aed3abbb64d38f25b95.zip
fix crash bug due to empyrt munged dial string; patch from metze
(This used to be commit aef7f54355a71e36963ed7427e9c2f05d26cc222)
-rw-r--r--source3/rpc_parse/parse_misc.c2
1 files changed, 1 insertions, 1 deletions
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");
}
}