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

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

Issue 1830243003: Added bounds checking to GetNameFromTT to handle corrupt files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 7688bb08ce7e51d4603a7a14affa4c1d26ed72ea..cf79fdc47dc116f3be7f5598fda889520c02ce6c 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -234,7 +234,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