From e4505fc27bf31dbf922635fac19ea52a2a002bd4 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Fri, 31 Aug 2012 17:41:31 +0200 Subject: tdb: return unpack error on strdup failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lars Müller Autobuild-User(master): David Disseldorp Autobuild-Date(master): Fri Aug 31 21:05:21 CEST 2012 on sn-devel-104 --- source3/lib/util_tdb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib') 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 *); -- cgit