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

Issue 2694363003: Fix Huffman tree construction. (Closed)

Created:
3 years, 10 months ago by martijnc
Modified:
3 years, 10 months ago
Reviewers:
Ryan Sleevi
CC:
cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix Huffman tree construction. HuffmanBuilder::ToVector() requires that there are at least 2 values in the tree to create the array representation. This CL updates HuffmanBuilder::BuildTree() to ensure it always returns a tree containing at least 2 values. Also demotes 2 CHECKs to DCHECKs because failure to align with the style guide as failure does not constitute a security issue and enforces the requirement that characters should not be larger than 127. BUG=595493 Review-Url: https://codereview.chromium.org/2694363003 Cr-Commit-Position: refs/heads/master@{#450910} Committed: https://chromium.googlesource.com/chromium/src/+/af126ad510eb5f6ba94fa96ef44bb49a576eaff6

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -12 lines) Patch
M net/tools/transport_security_state_generator/huffman/huffman_builder.h View 2 chunks +3 lines, -2 lines 0 comments Download
M net/tools/transport_security_state_generator/huffman/huffman_builder.cc View 5 chunks +17 lines, -10 lines 1 comment Download

Messages

Total messages: 10 (6 generated)
martijnc
This is split off from https://codereview.chromium.org/2681733008. https://codereview.chromium.org/2694363003/diff/20001/net/tools/transport_security_state_generator/huffman/huffman_builder.cc File net/tools/transport_security_state_generator/huffman/huffman_builder.cc (left): https://codereview.chromium.org/2694363003/diff/20001/net/tools/transport_security_state_generator/huffman/huffman_builder.cc#oldcode125 net/tools/transport_security_state_generator/huffman/huffman_builder.cc:125: if (item.second > ...
3 years, 10 months ago (2017-02-15 22:09:09 UTC) #4
Ryan Sleevi
lgtm
3 years, 10 months ago (2017-02-16 01:40:04 UTC) #5
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/2694363003/20001
3 years, 10 months ago (2017-02-16 08:41:40 UTC) #7
commit-bot: I haz the power
3 years, 10 months ago (2017-02-16 09:14:19 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/af126ad510eb5f6ba94fa96ef44b...

Powered by Google App Engine
This is Rietveld 408576698