Chromium Code Reviews| Index: chrome/common/safe_browsing/zip_analyzer.cc |
| =================================================================== |
| --- chrome/common/safe_browsing/zip_analyzer.cc (revision 193255) |
| +++ chrome/common/safe_browsing/zip_analyzer.cc (working copy) |
| @@ -18,7 +18,12 @@ |
| return; |
| } |
| - for (; reader.HasMore(); reader.AdvanceToNextEntry()) { |
| + bool advanced = true; |
| + for (; reader.HasMore(); advanced = reader.AdvanceToNextEntry()) { |
| + if (!advanced) { |
|
mattm
2013/04/10 20:05:22
maybe cleaner to use a while loop like:
while (has
Brian Ryner
2013/04/10 20:11:47
I'm not sure how much cleaner that turns out to be
mattm
2013/04/10 20:23:27
ah, right.
|
| + VLOG(1) << "Could not advance to next entry, aborting zip scan."; |
| + return; |
| + } |
| if (!reader.OpenCurrentEntryInZip()) { |
| VLOG(1) << "Failed to open current entry in zip file"; |
| continue; |