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

Unified Diff: core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp

Issue 1829013002: Added bounds checking to GetNameFromTT to handle corrupt files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fixed nits. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 2fddf10a7898efbcad33523e845e8efc130d08ff..82a0b9b0938e1447337357c05f475616ddd3f594 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -232,7 +232,7 @@ CFX_ByteString _FPDF_GetPSNameFromTT(HDC hDC) {
if (size != GDI_ERROR) {
LPBYTE buffer = FX_Alloc(BYTE, size);
::GetFontData(hDC, 'eman', 0, buffer, size);
- result = GetNameFromTT(buffer, 6);
+ result = GetNameFromTT(buffer, size, 6);
FX_Free(buffer);
}
return result;
« no previous file with comments | « no previous file | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698