------------------------------------------------------------ revno: 13503 revision-id: squid3@treenet.co.nz-20140718115117-5qw7n93nakl9zq8q parent: squid3@treenet.co.nz-20140718110216-szjeen7hrvismmv6 committer: Amos Jeffries branch nick: trunk timestamp: Fri 2014-07-18 04:51:17 -0700 message: Fix out of bounds memory access on -n option ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140718115117-5qw7n93nakl9zq8q # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 3ae413fd9a48f14c11400808896ba69df8c3387a # timestamp: 2014-07-18 11:54:13 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140718110216-\ # szjeen7hrvismmv6 # # Begin patch === modified file 'src/main.cc' --- src/main.cc 2014-07-14 12:58:03 +0000 +++ src/main.cc 2014-07-18 11:51:17 +0000 @@ -507,7 +507,7 @@ /** \par n * Set global option opt_signal_service (to true). * Stores the additional parameter given in global service_name */ - if (optarg || *optarg == '\0') { + if (optarg && *optarg != '\0') { const SBuf t(optarg); ::Parser::Tokenizer tok(t); const CharacterSet chr = CharacterSet::ALPHA+CharacterSet::DIGIT;