From 026f9c2858dd706ced2ac91163ae99ebb34e2de9 Mon Sep 17 00:00:00 2001 From: Eduard Bagdasaryan Date: Fri, 6 Jul 2018 12:34:30 +0000 Subject: [PATCH] Do not assign nil values in ACLFilledChecklist::syncAle() (#240) Being explicit about nil parameters protects (future) code from dereferencing them. --- src/acl/FilledChecklist.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/acl/FilledChecklist.cc b/src/acl/FilledChecklist.cc index b5ce7d21ac..27c49a8111 100644 --- a/src/acl/FilledChecklist.cc +++ b/src/acl/FilledChecklist.cc @@ -132,11 +132,11 @@ ACLFilledChecklist::syncAle(HttpRequest *adaptedRequest, const char *logUri) con { if (!al) return; - if (!al->adapted_request) { + if (adaptedRequest && !al->adapted_request) { al->adapted_request = adaptedRequest; HTTPMSGLOCK(al->adapted_request); } - if (al->url.isEmpty()) + if (logUri && al->url.isEmpty()) al->url = logUri; } -- 2.47.3