diff options
author | David Disseldorp <ddiss@samba.org> | 2012-08-31 17:41:31 +0200 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2012-08-31 21:05:21 +0200 |
commit | e4505fc27bf31dbf922635fac19ea52a2a002bd4 (patch) | |
tree | c19a284a6ce8146f0ae1381e51600291fafed69c | |
parent | 85706c4e168d90f329372b7411223cb2291ec9f6 (diff) | |
download | samba-e4505fc27bf31dbf922635fac19ea52a2a002bd4.tar.gz samba-e4505fc27bf31dbf922635fac19ea52a2a002bd4.tar.bz2 samba-e4505fc27bf31dbf922635fac19ea52a2a002bd4.zip |
tdb: return unpack error on strdup failure
Signed-off-by: Lars Müller <lars@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Aug 31 21:05:21 CEST 2012 on sn-devel-104
-rw-r--r-- | source3/lib/util_tdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c index c6c6d26277..8bfc75f18b 100644 --- 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 *); |