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

Unified Diff: chrome/browser/component_updater/component_unpacker.cc

Issue 7565002: Fix memory errors in ComponentUpdater::ComponentUpdater(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | chrome/browser/component_updater/component_updater_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/component_unpacker.cc
===================================================================
--- chrome/browser/component_updater/component_unpacker.cc (revision 95372)
+++ chrome/browser/component_updater/component_unpacker.cc (working copy)
@@ -91,7 +91,7 @@
}
const size_t kBufSize = 8 * 1024;
- scoped_ptr<uint8> buf(new uint8[kBufSize]);
+ scoped_array<uint8> buf(new uint8[kBufSize]);
while ((len = fread(buf.get(), 1, kBufSize, crx_file)) > 0)
verifier.VerifyUpdate(buf.get(), len);
@@ -208,4 +208,3 @@
file_util::Delete(unpack_path_, true);
}
}
-
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_updater_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698