Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(11)

Issue 2650513002: Fix buffer overrun in PDF accessibility code. (Closed)

Created:
2 years, 7 months ago by dmazzoni
Modified:
2 years, 7 months ago
Reviewers:
raymes
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix buffer overrun in PDF accessibility code. GetTextRunInfo scans until it finds the start of the next text run, then increments the character index by 1 in order to scan to the end of the text run. That was resulting in a buffer ovverun if the first scan reached the end of the array of characters without finding a non-whitespace character. Fix it by ensuring we never increment past the char count. BUG=668724 Review-Url: https://codereview.chromium.org/2650513002 Cr-Commit-Position: refs/heads/master@{#447344} Committed: https://chromium.googlesource.com/chromium/src/+/e4e4b0140002c58d760bf8d9f3fcfd7d29343486

Patch Set 1 #

Patch Set 2 : Adds test #

Total comments: 1

Patch Set 3 : Depend on pdf_private #

Total comments: 2

Patch Set 4 : Fixed merge error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M chrome/browser/pdf/pdf_extension_test.cc View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M pdf/pdfium/pdfium_page.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 28 (12 generated)
dmazzoni
2 years, 7 months ago (2017-01-20 21:57:06 UTC) #4
raymes
lg but is it possible to add a test for this?
2 years, 7 months ago (2017-01-22 23:43:38 UTC) #7
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/2650513002/20001
2 years, 7 months ago (2017-01-24 19:40:33 UTC) #9
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
2 years, 7 months ago (2017-01-24 19:40:35 UTC) #11
dmazzoni
Test added
2 years, 7 months ago (2017-01-24 19:40:37 UTC) #12
raymes
Just checking that the PDF is ok to add to our repository? (I should have ...
2 years, 7 months ago (2017-01-24 23:13:14 UTC) #13
dmazzoni
On 2017/01/24 23:13:14, raymes wrote: > Just checking that the PDF is ok to add ...
2 years, 7 months ago (2017-01-25 06:46:57 UTC) #14
dmazzoni
Not sure what to do here. The file is publicly available on the Internet, it's ...
2 years, 7 months ago (2017-01-25 20:42:54 UTC) #15
dmazzoni
Please review this change to add the test file to pdf_private first: https://chromereviews.googleplex.com/559577013/ Then this ...
2 years, 7 months ago (2017-01-26 06:50:59 UTC) #16
raymes
https://codereview.chromium.org/2650513002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc File chrome/browser/pdf/pdf_extension_test.cc (right): https://codereview.chromium.org/2650513002/diff/40001/chrome/browser/pdf/pdf_extension_test.cc#newcode731 chrome/browser/pdf/pdf_extension_test.cc:731: // Test a particular PDF encountered in the wild ...
2 years, 7 months ago (2017-01-30 18:57:26 UTC) #17
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/2650513002/60001
2 years, 7 months ago (2017-01-30 23:43:23 UTC) #19
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
2 years, 7 months ago (2017-01-30 23:43:25 UTC) #21
dmazzoni
Sorry, merge error. Take a look.
2 years, 7 months ago (2017-01-30 23:44:19 UTC) #22
raymes
lgtm
2 years, 7 months ago (2017-01-31 21:04:04 UTC) #23
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/2650513002/60001
2 years, 7 months ago (2017-01-31 21:05:33 UTC) #25
commit-bot: I haz the power
2 years, 7 months ago (2017-01-31 22:13:13 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/e4e4b0140002c58d760bf8d9f3fc...

Powered by Google App Engine
This is Rietveld 408576698