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

Issue 306923006: Use unsigned type for iteration to avoid int overflow. (Closed)

Created:
6 years, 6 months ago by halyavin
Modified:
6 years, 6 months ago
Reviewers:
Bo Xu, jam
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Visibility:
Public.

Description

Use unsigned type for iteration to avoid int overflow. If src_len in PDF_DecodeText is larger than 2^31, 2 * max_chars will overflow and the function will produce an incorrect result. BUG=none R=bo_xu@foxitsoftware.com Committed: https://pdfium.googlesource.com/pdfium/+/bb2b1e7

Patch Set 1 #

Patch Set 2 : make max_chars unsigned too. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
halyavin
6 years, 6 months ago (2014-05-30 05:14:48 UTC) #1
jabdelmalek
I defer to Bo or other Foxit folks for this code.
6 years, 6 months ago (2014-05-30 23:51:14 UTC) #2
Bo Xu
lgtm
6 years, 6 months ago (2014-06-04 16:48:45 UTC) #3
halyavin
On 2014/06/04 16:48:45, bo_xu wrote: > lgtm Can you commit this change for me, please?
6 years, 6 months ago (2014-06-04 18:34:57 UTC) #4
jam
6 years, 6 months ago (2014-06-04 23:04:40 UTC) #5
Message was sent while issue was closed.
On 2014/06/04 18:34:57, halyavin wrote:
> On 2014/06/04 16:48:45, bo_xu wrote:
> > lgtm
> 
> Can you commit this change for me, please?

done

Powered by Google App Engine
This is Rietveld 408576698