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

Issue 1160643002: Remove dangerous std::string constructor for der::Input (Closed)

Created:
5 years, 7 months ago by nharper
Modified:
5 years, 6 months ago
Reviewers:
Ryan Sleevi, mattm
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove dangerous std::string constructor for der::Input BUG=490472 Committed: https://crrev.com/ab7f492e15f167aace4d448b8e00053788038760 Cr-Commit-Position: refs/heads/master@{#333201}

Patch Set 1 #

Patch Set 2 : Fix null-terminated strings bug, and use a static factory method instead of another constructor #

Total comments: 3

Patch Set 3 : Remove FromCString; use uint8_t array literals instead of string literals now #

Total comments: 2

Patch Set 4 : rebase #

Patch Set 5 : Use helper in test for constructing Input from string literal #

Patch Set 6 : Put helper in anonymous namespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -80 lines) Patch
M net/cert/internal/verify_name_match_unittest.cc View 1 2 1 chunk +7 lines, -4 lines 0 comments Download
M net/der/input.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M net/der/input.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M net/der/input_unittest.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M net/der/parse_values_unittest.cc View 1 2 3 4 5 3 chunks +65 lines, -66 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
nharper
5 years, 7 months ago (2015-05-26 15:39:48 UTC) #2
nharper
Fix null-terminated strings bug, and use a static factory method instead of another constructor
5 years, 7 months ago (2015-05-26 17:02:03 UTC) #3
Ryan Sleevi
I'd prefer this be addressed simply be removing the constructor and updating the tests. https://codereview.chromium.org/1160643002/diff/20001/net/der/input.h ...
5 years, 7 months ago (2015-05-26 18:53:30 UTC) #4
nharper
On 2015/05/26 18:53:30, Ryan Sleevi wrote: > I'd prefer this be addressed simply be removing ...
5 years, 7 months ago (2015-05-26 19:22:10 UTC) #5
Ryan Sleevi
On 2015/05/26 19:22:10, nharper wrote: > I can do that. Just to be clear, that ...
5 years, 7 months ago (2015-05-26 19:35:54 UTC) #6
nharper
Remove FromCString; use uint8_t array literals instead of string literals now
5 years, 7 months ago (2015-05-26 22:09:34 UTC) #7
nharper
https://codereview.chromium.org/1160643002/diff/20001/net/der/input_unittest.cc File net/der/input_unittest.cc (right): https://codereview.chromium.org/1160643002/diff/20001/net/der/input_unittest.cc#newcode21 net/der/input_unittest.cc:21: memcpy(input_copy, kInput, arraysize(kInput)); On 2015/05/26 18:53:30, Ryan Sleevi wrote: ...
5 years, 7 months ago (2015-05-26 22:11:49 UTC) #8
Ryan Sleevi
OK, after our chat, I think probably the least-gross way is probably to put a ...
5 years, 6 months ago (2015-06-03 23:09:11 UTC) #9
nharper
rebase
5 years, 6 months ago (2015-06-05 23:26:52 UTC) #10
nharper
Use helper in test for constructing Input from string literal
5 years, 6 months ago (2015-06-06 00:05:30 UTC) #11
nharper
Put helper in anonymous namespace
5 years, 6 months ago (2015-06-06 00:07:59 UTC) #12
nharper
Added helper function to parse_values_unittest to make it more readable.
5 years, 6 months ago (2015-06-06 00:10:35 UTC) #13
Ryan Sleevi
lgtm
5 years, 6 months ago (2015-06-06 00:16:34 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1160643002/90001
5 years, 6 months ago (2015-06-06 00:18:16 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:90001)
5 years, 6 months ago (2015-06-06 01:47:29 UTC) #17
commit-bot: I haz the power
5 years, 6 months ago (2015-06-06 01:48:16 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/ab7f492e15f167aace4d448b8e00053788038760
Cr-Commit-Position: refs/heads/master@{#333201}

Powered by Google App Engine
This is Rietveld 408576698