diff options
author | marha <marha@users.sourceforge.net> | 2012-02-24 08:16:00 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-24 08:16:00 +0100 |
commit | 5fb4fb602bde5140dcea45464e3b70a49078ad2e (patch) | |
tree | 24db226b5f69e9a8c9c3aea11e7a27a82620fa2c /fontconfig/src | |
parent | 6baac61e6ca9cd314e689dfe7f84771aad08c66e (diff) | |
download | vcxsrv-5fb4fb602bde5140dcea45464e3b70a49078ad2e.tar.gz vcxsrv-5fb4fb602bde5140dcea45464e3b70a49078ad2e.tar.bz2 vcxsrv-5fb4fb602bde5140dcea45464e3b70a49078ad2e.zip |
fontconfig libX11 pixman xserver git update 24 Feb 2012
Diffstat (limited to 'fontconfig/src')
-rw-r--r-- | fontconfig/src/fccfg.c | 10 | ||||
-rw-r--r-- | fontconfig/src/ftglue.c | 3 |
2 files changed, 11 insertions, 2 deletions
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; } |