------------------------------------------------------------ revno: 13613 revision-id: squid3@treenet.co.nz-20140928184909-lzrrdxtan0k5a6y7 parent: squid3@treenet.co.nz-20140928184255-rdwoutp04xjr9567 committer: Amos Jeffries branch nick: trunk timestamp: Sun 2014-09-28 11:49:09 -0700 message: Cleanup: use SBuf::npos instead of npos in SBuf::append() Small experiment. It is possible on some systems that std::npos / ::npos is defined with a different integer size and value. This may be what is confusing Coverity scan and producing buffer overrun alerts in the append() c-string with default parameter case. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140928184909-lzrrdxtan0k5a6y7 # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 489f68e0348e5b5ca309010c02a0a2c4ff5e1a0f # timestamp: 2014-10-02 09:21:27 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140928184255-\ # rdwoutp04xjr9567 # # Begin patch === modified file 'src/SBuf.cc' --- src/SBuf.cc 2014-09-13 13:59:43 +0000 +++ src/SBuf.cc 2014-09-28 18:49:09 +0000 @@ -210,7 +210,7 @@ { if (S == NULL) return *this; - if (Ssize == npos) + if (Ssize == SBuf::npos) Ssize = strlen(S); debugs(24, 7, "from c-string to id " << id); // coverity[access_dbuff_in_call]