summaryrefslogtreecommitdiff
path: root/source3/tdb/tdbutil.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-30 06:23:05 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-30 06:23:05 +0000
commitad7c3ea0f0918f09283ab28e4fe99f1156ab52f1 (patch)
tree2a2ac0fb57648120fdc3589e1b2fc587e73bca1d /source3/tdb/tdbutil.c
parent6315ea80fc65725e21f59b3c956e0f61de7139b5 (diff)
downloadsamba-ad7c3ea0f0918f09283ab28e4fe99f1156ab52f1.tar.gz
samba-ad7c3ea0f0918f09283ab28e4fe99f1156ab52f1.tar.bz2
samba-ad7c3ea0f0918f09283ab28e4fe99f1156ab52f1.zip
merged fix for tdb_unpack from 2_2
(This used to be commit 200b682e9bbe79897343422f7c870382ed6de40a)
Diffstat (limited to 'source3/tdb/tdbutil.c')
-rw-r--r--source3/tdb/tdbutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 409397366a..0a2f1f84d4 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -292,7 +292,10 @@ int tdb_unpack(char *buf, int bufsize, char *fmt, ...)
len = 4;
if (bufsize < len) goto no_space;
*i = IVAL(buf, 0);
- if (! *i) break;
+ if (! *i) {
+ *b = NULL;
+ break;
+ }
len += *i;
if (bufsize < len) goto no_space;
*b = (char *)malloc(*i);