git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8831b06
)
lib/util: Fix cppcheck null pointer dereference warning
author
Noel Power
<noel.power@suse.com>
Tue, 21 May 2019 10:48:18 +0000
(10:48 +0000)
committer
Noel Power
<npower@samba.org>
Wed, 29 May 2019 10:10:23 +0000
(10:10 +0000)
lib/util/talloc_report.c:58: warning: nullPointer: Possible null pointer dereference: start <--[cppcheck]
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/util/talloc_report.c
patch
|
blob
|
history
diff --git
a/lib/util/talloc_report.c
b/lib/util/talloc_report.c
index bed0fd91e43edd4d3f9902a24d3824f10f7be2bb..fb12a2f631c8944afd16f86f5d8cbca7ff660c33 100644
(file)
--- a/
lib/util/talloc_report.c
+++ b/
lib/util/talloc_report.c
@@
-52,6
+52,8
@@
static char *talloc_vasprintf_append_largebuf(char *buf, ssize_t *pstr_len,
if (buflen > str_len) {
start = buf + str_len;
space = buflen - str_len;
+ } else {
+ return NULL;
}
va_copy(ap2, ap);