1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-25 16:01:38 +03:00

the numberOfPairs may not be negative when numberOfPairs*2 is negative

This commit is contained in:
Steve Lhomme
2013-08-20 09:10:19 +02:00
parent 801cd34d48
commit 787ec360de

View File

@@ -281,7 +281,7 @@ final class Spdy3 implements Variant {
this.compressedLimit += length;
try {
int numberOfPairs = nameValueBlockIn.readInt();
if (numberOfPairs < 0) {
if ((numberOfPairs * 2) < 0) {
Logger.getLogger(getClass().getName()).warning("numberOfPairs < 0: " + numberOfPairs);
throw ioException("numberOfPairs < 0");
}