Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6191)

Unified Diff: chrome/common/zip.cc

Issue 155984: Fix an off-by-one in the zip filename reading code. It's pretty harmless, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/zip.cc
===================================================================
--- chrome/common/zip.cc (revision 21370)
+++ chrome/common/zip.cc (working copy)
@@ -23,7 +23,7 @@
char filename_inzip[kZipMaxPath] = {0};
unz_file_info file_info;
int err = unzGetCurrentFileInfo(zip_file, &file_info, filename_inzip,
- sizeof(filename_inzip), NULL, 0, NULL, 0);
+ sizeof(filename_inzip) - 1, NULL, 0, NULL, 0);
if (err != UNZ_OK)
return false;
if (filename_inzip[0] == '\0')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698