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

Issue 1094763002: Make CFX_StockFontArray more robust. (Closed)

Created:
5 years, 8 months ago by Lei Zhang
Modified:
5 years, 8 months ago
Reviewers:
Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make CFX_StockFontArray more robust. - Check bounds when accessing array. - Remove potential memory leak. - Merge duplicate code. R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/ee2fe42f9bf3ac6afc4f05f79629a3e34179a2b9

Patch Set 1 #

Total comments: 3

Patch Set 2 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -38 lines) Patch
M core/src/fpdfapi/fpdf_font/font_int.h View 2 chunks +2 lines, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font.cpp View 1 5 chunks +42 lines, -37 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Lei Zhang
I saw a snippet of fishy code when reviewing the FX_NEW change. https://codereview.chromium.org/1094763002/diff/1/core/src/fpdfapi/fpdf_font/font_int.h File core/src/fpdfapi/fpdf_font/font_int.h ...
5 years, 8 months ago (2015-04-16 22:43:03 UTC) #2
Tom Sepez
lgtm https://codereview.chromium.org/1094763002/diff/1/core/src/fpdfapi/fpdf_font/fpdf_font.cpp File core/src/fpdfapi/fpdf_font/fpdf_font.cpp (right): https://codereview.chromium.org/1094763002/diff/1/core/src/fpdfapi/fpdf_font/fpdf_font.cpp#newcode57 core/src/fpdfapi/fpdf_font/fpdf_font.cpp:57: CPDF_Font* GetFont(int index) nit: this is probably a ...
5 years, 8 months ago (2015-04-16 22:50:01 UTC) #3
Lei Zhang
Committed patchset #2 (id:20001) manually as ee2fe42f9bf3ac6afc4f05f79629a3e34179a2b9 (presubmit successful).
5 years, 8 months ago (2015-04-16 23:42:57 UTC) #4
Lei Zhang
5 years, 8 months ago (2015-04-16 23:48:19 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/1094763002/diff/1/core/src/fpdfapi/fpdf_font/...
File core/src/fpdfapi/fpdf_font/fpdf_font.cpp (right):

https://codereview.chromium.org/1094763002/diff/1/core/src/fpdfapi/fpdf_font/...
core/src/fpdfapi/fpdf_font/fpdf_font.cpp:57: CPDF_Font* GetFont(int index)
On 2015/04/16 22:50:01, Tom Sepez wrote:
> nit: this is probably a const method.

Done.

Powered by Google App Engine
This is Rietveld 408576698