summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 86ea83d7aa..203122e73c 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -1016,7 +1016,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");
}
}