]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix infinite-loop in CharacterSet::operator+=()
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 11 Dec 2013 01:30:34 +0000 (17:30 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 11 Dec 2013 01:30:34 +0000 (17:30 -0800)
commit7d90d19d0a37974f973c9f9889058df12a5e0d31
tree2f35c11fa0fd6d24dec07a602e14f289aebcd1a4
parentf51e6fc202c4afce094a6f33f3a1b59f5e935689
Fix infinite-loop in CharacterSet::operator+=()

The uint8_t type value cannot represent the value 256, which is why we
use it as the loop terminator and an iterator of a size larger than
8-bit with a down-cast to prevent the vector accidentally being grown by
an overflow.
src/parser/CharacterSet.h