summaryrefslogtreecommitdiffstats
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
commit200b682e9bbe79897343422f7c870382ed6de40a (patch)
tree1920df6e9c0fa1890a200fad864fb8474c06107b
parentc20838c6358f02dea7967e28a5f23db70ff464f9 (diff)
downloadsamba-200b682e9bbe79897343422f7c870382ed6de40a.tar.gz
samba-200b682e9bbe79897343422f7c870382ed6de40a.tar.xz
samba-200b682e9bbe79897343422f7c870382ed6de40a.zip
merged fix for tdb_unpack from 2_2
-rw-r--r--source/tdb/tdbutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/tdb/tdbutil.c b/source/tdb/tdbutil.c
index 409397366a9..0a2f1f84d45 100644
--- a/source/tdb/tdbutil.c
+++ b/source/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);