r6528: - in tdb_fetch() we effectively disallowed zero length records by
[samba.git] / source / lib / data_blob.c
index 284db4518f161b61e91a53e19c9fa7293d385273..2ec21717b1372052026f1f8f88927d570038e3ad 100644 (file)
@@ -29,7 +29,7 @@ DATA_BLOB data_blob_named(const void *p, size_t length, const char *name)
 {
        DATA_BLOB ret;
 
-       if (length == 0) {
+       if (p == NULL && length == 0) {
                ZERO_STRUCT(ret);
                return ret;
        }