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

Unified Diff: third_party/freetype/src/base/ftadvanc.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 years 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 | « third_party/freetype/src/base/basepic.c ('k') | third_party/freetype/src/base/ftapi.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype/src/base/ftadvanc.c
diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftadvanc.c b/third_party/freetype/src/base/ftadvanc.c
similarity index 94%
rename from core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftadvanc.c
rename to third_party/freetype/src/base/ftadvanc.c
index 652e51b1ed94a48c10b68cacb47d5a439b2d680f..18884efe19e12095f24d021299a477028b9c66f9 100644
--- a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftadvanc.c
+++ b/third_party/freetype/src/base/ftadvanc.c
@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (body). */
/* */
-/* Copyright 2008, 2009, 2011, 2013 by */
+/* Copyright 2008, 2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,11 +16,11 @@
/***************************************************************************/
-#include "../../include/ft2build.h"
-#include "../../include/freetype/internal/ftdebug.h"
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
-#include "../../include/freetype/ftadvanc.h"
-#include "../../include/freetype/internal/ftobjs.h"
+#include FT_ADVANCES_H
+#include FT_INTERNAL_OBJECTS_H
static FT_Error
@@ -80,6 +80,9 @@
if ( !face )
return FT_THROW( Invalid_Face_Handle );
+ if ( !padvance )
+ return FT_THROW( Invalid_Argument );
+
if ( gindex >= (FT_UInt)face->num_glyphs )
return FT_THROW( Invalid_Glyph_Index );
@@ -118,6 +121,9 @@
if ( !face )
return FT_THROW( Invalid_Face_Handle );
+ if ( !padvances )
+ return FT_THROW( Invalid_Argument );
+
num = (FT_UInt)face->num_glyphs;
end = start + count;
if ( start >= num || end < start || end > num )
« no previous file with comments | « third_party/freetype/src/base/basepic.c ('k') | third_party/freetype/src/base/ftapi.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698