summaryrefslogtreecommitdiff
path: root/source4/lib/util/data_blob.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util/data_blob.c')
-rw-r--r--source4/lib/util/data_blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/util/data_blob.c b/source4/lib/util/data_blob.c
index b258e47bba..57b34b7ae7 100644
--- a/source4/lib/util/data_blob.c
+++ b/source4/lib/util/data_blob.c
@@ -176,7 +176,7 @@ _PUBLIC_ DATA_BLOB data_blob_string_const(const char *str)
{
DATA_BLOB blob;
blob.data = discard_const_p(uint8_t, str);
- blob.length = strlen(str);
+ blob.length = str ? strlen(str) : 0;
return blob;
}