From 5fb4fb602bde5140dcea45464e3b70a49078ad2e Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 24 Feb 2012 08:16:00 +0100 Subject: fontconfig libX11 pixman xserver git update 24 Feb 2012 --- fontconfig/src/fccfg.c | 10 +++++++++- fontconfig/src/ftglue.c | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'fontconfig/src') diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c index 09c59919d..9395f743d 100644 --- a/fontconfig/src/fccfg.c +++ b/fontconfig/src/fccfg.c @@ -2023,7 +2023,15 @@ FcConfigGlobMatch (const FcChar8 *glob, return FcTrue; /* short circuit another common case */ if (strchr ((char *) glob, '*') == 0) - string += strlen ((char *) string) - strlen ((char *) glob); + { + size_t l1, l2; + + l1 = strlen ((char *) string); + l2 = strlen ((char *) glob); + if (l1 < l2) + return FcFalse; + string += (l1 - l2); + } while (*string) { if (FcConfigGlobMatch (glob, string)) diff --git a/fontconfig/src/ftglue.c b/fontconfig/src/ftglue.c index d5af810b4..7c643d0ff 100644 --- a/fontconfig/src/ftglue.c +++ b/fontconfig/src/ftglue.c @@ -82,7 +82,6 @@ ftglue_stream_seek( FT_Stream stream, { FT_Error error = 0; - stream->pos = pos; if ( stream->read ) { if ( stream->read( stream, pos, 0, 0 ) ) @@ -91,6 +90,8 @@ ftglue_stream_seek( FT_Stream stream, else if ( pos > stream->size ) error = FT_Err_Invalid_Stream_Operation; + if ( !error ) + stream->pos = pos; LOG(( "ftglue:stream:seek(%ld) -> %d\n", pos, error )); return error; } -- cgit v1.2.3