From: Andreas Schneider Date: Wed, 22 Jun 2016 07:17:07 +0000 (+0200) Subject: util: Fix a possible null pointer dereference X-Git-Tag: tdb-1.3.10~749 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e88ab727a68eb3979ad1bde65001130c7166d1f;p=thirdparty%2Fsamba.git util: Fix a possible null pointer dereference Found by cppcheck. Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/lib/util/talloc_report.c b/lib/util/talloc_report.c index 9b98347e97c..018d9ab6570 100644 --- a/lib/util/talloc_report.c +++ b/lib/util/talloc_report.c @@ -40,6 +40,9 @@ static char *talloc_vasprintf_append_largebuf(char *buf, ssize_t *pstr_len, if (buf == NULL) { return NULL; } + if (fmt == NULL) { + return NULL; + } buflen = talloc_get_size(buf); if (buflen > str_len) {