git.samba.org
/
kai
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tdb: return unpack error on strdup failure
[kai/samba.git]
/
source3
/
lib
/
util_tdb.c
diff --git
a/source3/lib/util_tdb.c
b/source3/lib/util_tdb.c
index c6c6d262772c567260306fb5b2fa07474808e10d..8bfc75f18b65631459b1c45e841056e067281618 100644
(file)
--- a/
source3/lib/util_tdb.c
+++ b/
source3/lib/util_tdb.c
@@
-237,6
+237,9
@@
int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...)
if (bufsize < len)
goto no_space;
*ps = SMB_STRDUP((const char *)buf);
+ if (*ps == NULL) {
+ goto no_space;
+ }
break;
case 'f': /* null-terminated string */
s = va_arg(ap,char *);