[master] 9b5332e2a Add an assert
Poul-Henning Kamp
phk at FreeBSD.org
Mon Dec 9 19:20:09 UTC 2019
commit 9b5332e2a2e0c5d3a0485704164ea9d3cebe4b68
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Dec 9 19:19:35 2019 +0000
Add an assert
diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c
index 2adf50d02..66fc7b1ed 100644
--- a/lib/libvarnish/vsb.c
+++ b/lib/libvarnish/vsb.c
@@ -309,6 +309,8 @@ VSB_cat(struct vsb *s, const char *str)
assert_VSB_integrity(s);
assert_VSB_state(s, 0);
+ KASSERT(str != NULL,
+ ("%s called with a NULL str pointer", __func__));
if (s->s_error != 0)
return (-1);
More information about the varnish-commit
mailing list