Chromium Code Reviews| Index: net/http/http_chunked_decoder.cc |
| diff --git a/net/http/http_chunked_decoder.cc b/net/http/http_chunked_decoder.cc |
| index d5b16ddb6ea738ae4530e7d33b74ba06de66f336..ead6e6c32a7e7e1dc53e49a5255f50682559fc32 100644 |
| --- a/net/http/http_chunked_decoder.cc |
| +++ b/net/http/http_chunked_decoder.cc |
| @@ -187,12 +187,13 @@ bool HttpChunkedDecoder::ParseChunkSize(const char* start, int len, int* out) { |
| // Be more restrictive than HexStringToInt; |
| // don't allow inputs with leading "-", "+", "0x", "0X" |
| - if (base::StringPiece(start, len).find_first_not_of("0123456789abcdefABCDEF") |
| + base::StringPiece chunk_size(start, len); |
| + if (chunk_size.find_first_not_of("0123456789abcdefABCDEF") |
|
erikwright (departed)
2011/12/14 04:24:08
need {} around if and else blocks when condition w
|
| != base::StringPiece::npos) |
| return false; |
| int parsed_number; |
| - bool ok = base::HexStringToInt(start, start + len, &parsed_number); |
| + bool ok = base::HexStringToInt(chunk_size, &parsed_number); |
| if (ok && parsed_number >= 0) { |
| *out = parsed_number; |
| return true; |