------------------------------------------------------------ revno: 13137 revision-id: squid3@treenet.co.nz-20140603064839-a9d13wik079054sa parent: squid3@treenet.co.nz-20140520164006-zfjidsfhvk6kvfqy fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=4050 author: Alex Rousskov committer: Amos Jeffries branch nick: 3.4 timestamp: Tue 2014-06-03 00:48:39 -0600 message: Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140603064839-a9d13wik079054sa # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: dfb7b309b173784b3461655ec36616a5054751d4 # timestamp: 2014-06-03 06:53:55 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squid3@treenet.co.nz-20140520164006-\ # zfjidsfhvk6kvfqy # # Begin patch === modified file 'src/external_acl.cc' --- src/external_acl.cc 2013-11-29 10:55:53 +0000 +++ src/external_acl.cc 2014-06-03 06:48:39 +0000 @@ -1603,14 +1603,16 @@ checklist->extacl_entry = cbdataReference((external_acl_entry *)result); // attach the helper kv-pair to the transaction - if (HttpRequest * req = checklist->request) { - // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes(). - // workaround by using anything already set in HttpRequest - // OR use new and rely on a later Sync copying these to AccessLogEntry - if (!req->notes) - req->notes = new NotePairs; + if (checklist->extacl_entry) { + if (HttpRequest * req = checklist->request) { + // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes(). + // workaround by using anything already set in HttpRequest + // OR use new and rely on a later Sync copying these to AccessLogEntry + if (!req->notes) + req->notes = new NotePairs; - req->notes->appendNewOnly(&checklist->extacl_entry->notes); + req->notes->appendNewOnly(&checklist->extacl_entry->notes); + } } checklist->resumeNonBlockingCheck(ExternalACLLookup::Instance());