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

Unified Diff: chrome/browser/policy/preg_parser_win.cc

Issue 23961004: Avoid a write to NULL in ReadFieldBinary (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 3 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/browser/policy/preg_parser_win.cc
===================================================================
--- chrome/browser/policy/preg_parser_win.cc (revision 221935)
+++ chrome/browser/policy/preg_parser_win.cc (working copy)
@@ -66,6 +66,8 @@
const uint8* end,
int size,
uint8* data) {
+ if (!size)
+ return false;
const uint8* field_end = *cursor + size;
if (field_end > end)
return false;
« 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