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

Issue 23704008: Properly handle zero-sized fields in the PReg parser. (Closed)

Created:
7 years, 3 months ago by Mattias Nissler (ping if slow)
Modified:
7 years, 3 months ago
Reviewers:
Joao da Silva
CC:
chromium-reviews, cpu_(ooo_6.6-7.5)
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Properly handle zero-sized fields in the PReg parser. For zero-sized values, we'd previously pass NULL to std::copy, which is not OK though if the number of elements to copy is 0. Avoid the copy altogether and cover this situation in the unit test. BUG=None R=joaodasilva@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223345

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -5 lines) Patch
M chrome/browser/policy/preg_parser_win.cc View 1 chunk +5 lines, -4 lines 2 comments Download
M chrome/browser/policy/preg_parser_win_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/data/policy/registry.pol View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Mattias Nissler (ping if slow)
Please review.
7 years, 3 months ago (2013-09-13 13:50:07 UTC) #1
Mattias Nissler (ping if slow)
For reference, here's the new version of the registry.pol file, I just added one entry ...
7 years, 3 months ago (2013-09-13 13:52:24 UTC) #2
Joao da Silva
lgtm with a suggestion https://chromiumcodereview-hr.appspot.com/23704008/diff/1/chrome/browser/policy/preg_parser_win.cc File chrome/browser/policy/preg_parser_win.cc (right): https://chromiumcodereview-hr.appspot.com/23704008/diff/1/chrome/browser/policy/preg_parser_win.cc#newcode73 chrome/browser/policy/preg_parser_win.cc:73: if (field_end <= *cursor || ...
7 years, 3 months ago (2013-09-13 14:18:07 UTC) #3
Mattias Nissler (ping if slow)
https://chromiumcodereview-hr.appspot.com/23704008/diff/1/chrome/browser/policy/preg_parser_win.cc File chrome/browser/policy/preg_parser_win.cc (right): https://chromiumcodereview-hr.appspot.com/23704008/diff/1/chrome/browser/policy/preg_parser_win.cc#newcode73 chrome/browser/policy/preg_parser_win.cc:73: if (field_end <= *cursor || field_end > end) On ...
7 years, 3 months ago (2013-09-13 14:40:24 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mnissler@chromium.org/23704008/1
7 years, 3 months ago (2013-09-16 07:55:48 UTC) #5
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=79211
7 years, 3 months ago (2013-09-16 09:57:51 UTC) #6
Mattias Nissler (ping if slow)
7 years, 3 months ago (2013-09-16 15:33:52 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 manually as r223345 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698