Make data_blob_string_const return null terminated strings
authorVolker Lendecke <vl@samba.org>
Thu, 20 Dec 2007 14:16:25 +0000 (15:16 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 21 Dec 2007 08:58:20 +0000 (09:58 +0100)
... nobody was using it, so we're free to change it now :-)
(This used to be commit 4b06c68482247d859ec30b8b1920706e43358989)

source3/lib/data_blob.c

index e64e6a19a1632b3cc23d2c9b06e47f537483abd1..8bbbc32d7b1d62d9481ef8bfc8a0b5fbca520f23 100644 (file)
@@ -128,7 +128,7 @@ DATA_BLOB data_blob_string_const(const char *str)
 {
        DATA_BLOB blob;
        blob.data = CONST_DISCARD(uint8 *, str);
-       blob.length = strlen(str);
+       blob.length = strlen(str) + 1;
        blob.free = NULL;
        return blob;
 }