[master] dea77acca avoid null pointer deref in panic code
Nils Goroll
nils.goroll at uplex.de
Mon Aug 5 14:30:15 UTC 2019
commit dea77acca891aff4f46fc60f61f37d018e3c22a2
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sun Jul 21 13:03:38 2019 +0200
avoid null pointer deref in panic code
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 60a521ece..8a9c88775 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -533,7 +533,7 @@ pan_req(struct vsb *vsb, const struct req *req)
if (VALID_OBJ(req->htc, HTTP_CONN_MAGIC))
pan_htc(vsb, req->htc);
pan_http(vsb, "req", req->http);
- if (req->resp->ws != NULL)
+ if (req->resp != NULL && req->resp->ws != NULL)
pan_http(vsb, "resp", req->resp);
if (req->vdc != NULL)
pan_vdp(vsb, req->vdc);
More information about the varnish-commit
mailing list