Fix crash caused by an unsigned overflow.

Thanks to Joseph Bisch for discovery.
This was an artifact of converting ZNC to use CMessage. Released
versions are not affected.
This commit is contained in:
Alexey Sokolov
2017-10-03 08:03:37 +01:00
parent 448f020a7a
commit d73a4090c8

View File

@@ -1320,7 +1320,7 @@ void CIRCSock::ReachedMaxBuffer() {
void CIRCSock::ParseISupport(const CMessage& Message) {
const VCString vsParams = Message.GetParams();
for (size_t i = 1; i < vsParams.size() - 1; ++i) {
for (size_t i = 1; i + 1 < vsParams.size(); ++i) {
const CString& sParam = vsParams[i];
CString sName = sParam.Token(0, false, "=");
CString sValue = sParam.Token(1, true, "=");