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

Issue 2885243002: [NtRegistry] Ensure REG_SZ and REG_MULTI_SZ are null terminated. (Closed)

Created:
3 years, 7 months ago by penny
Modified:
3 years, 4 months ago
CC:
chromium-reviews, pennymac+watch_chromium.org, caitkp+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[NtRegistry] Ensure REG_SZ and REG_MULTI_SZ are null terminated. Enforced in base QueryRegKeyValue function. TBR=robertshield BUG=714401 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2885243002 Cr-Commit-Position: refs/heads/master@{#490780} Committed: https://chromium.googlesource.com/chromium/src/+/42c976267d61dceba3ad216d7e475288feeed409

Patch Set 1 #

Total comments: 4

Patch Set 2 : Code review fixes, part 1. #

Total comments: 23

Patch Set 3 : Code review fixes, part 2. #

Total comments: 10

Patch Set 4 : Code review fixes, part 3. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -50 lines) Patch
M chrome_elf/nt_registry/nt_registry.h View 1 2 3 2 chunks +9 lines, -5 lines 0 comments Download
M chrome_elf/nt_registry/nt_registry.cc View 1 2 3 8 chunks +83 lines, -41 lines 0 comments Download
M chrome_elf/nt_registry/nt_registry_unittest.cc View 1 2 5 chunks +115 lines, -4 lines 0 comments Download

Messages

Total messages: 38 (24 generated)
penny
Hi Robert! Small patch to catch any sneaky business, resulting in a SZ or MULTI_SZ ...
3 years, 7 months ago (2017-05-17 16:09:10 UTC) #8
robertshield
https://codereview.chromium.org/2885243002/diff/1/chrome_elf/nt_registry/nt_registry.cc File chrome_elf/nt_registry/nt_registry.cc (right): https://codereview.chromium.org/2885243002/diff/1/chrome_elf/nt_registry/nt_registry.cc#newcode780 chrome_elf/nt_registry/nt_registry.cc:780: *out_buffer = new BYTE[*out_size]; totally optional, as this looks ...
3 years, 7 months ago (2017-05-17 16:59:59 UTC) #9
grt (UTC plus 2)
i have a somewhat different suggestion: - i see QueryRegKeyValue as a raw "give me ...
3 years, 7 months ago (2017-05-18 08:21:10 UTC) #11
penny
Thanks to you both! I've moved the termination sanity check out into the two SZ/MULTISZ ...
3 years, 5 months ago (2017-07-19 22:25:15 UTC) #14
grt (UTC plus 2)
looks pretty good. a few comments below. https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc File chrome_elf/nt_registry/nt_registry.cc (right): https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc#newcode556 chrome_elf/nt_registry/nt_registry.cc:556: for (size_t ...
3 years, 5 months ago (2017-07-20 05:22:53 UTC) #17
robertshield
https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc File chrome_elf/nt_registry/nt_registry.cc (right): https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc#newcode929 chrome_elf/nt_registry/nt_registry.cc:929: std::wstring temp = pointer; Won't this truncate any characters ...
3 years, 5 months ago (2017-07-20 17:14:04 UTC) #18
penny
Thanks! https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc File chrome_elf/nt_registry/nt_registry.cc (right): https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc#newcode556 chrome_elf/nt_registry/nt_registry.cc:556: for (size_t i = value_bytes->size(); i < terminator_size; ...
3 years, 5 months ago (2017-07-20 18:38:37 UTC) #21
grt (UTC plus 2)
https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc File chrome_elf/nt_registry/nt_registry.cc (right): https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc#newcode886 chrome_elf/nt_registry/nt_registry.cc:886: *out_sz = reinterpret_cast<wchar_t*>(value_bytes.data()); On 2017/07/20 18:38:37, penny wrote: > ...
3 years, 5 months ago (2017-07-21 08:09:01 UTC) #24
penny
Dry run underway! https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc File chrome_elf/nt_registry/nt_registry.cc (right): https://codereview.chromium.org/2885243002/diff/20001/chrome_elf/nt_registry/nt_registry.cc#newcode886 chrome_elf/nt_registry/nt_registry.cc:886: *out_sz = reinterpret_cast<wchar_t*>(value_bytes.data()); On 2017/07/21 08:09:00, ...
3 years, 5 months ago (2017-07-25 18:30:48 UTC) #27
penny
Ping, Robert or Greg. Thanks!
3 years, 4 months ago (2017-07-27 21:19:58 UTC) #30
grt (UTC plus 2)
lgtm. apologies for the delay!
3 years, 4 months ago (2017-07-31 14:03:50 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2885243002/60001
3 years, 4 months ago (2017-07-31 16:28:20 UTC) #34
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/42c976267d61dceba3ad216d7e475288feeed409
3 years, 4 months ago (2017-07-31 17:39:03 UTC) #37
penny
3 years, 4 months ago (2017-07-31 18:33:32 UTC) #38
Message was sent while issue was closed.
Thanks very much for your review time Greg and Robert!

Powered by Google App Engine
This is Rietveld 408576698