aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-24 08:18:51 +0100
committermarha <marha@users.sourceforge.net>2012-02-24 08:18:51 +0100
commit6f066fc9e28c33779b89e7e48e6437965dde9b77 (patch)
treeb2b9767762bd559d1edd808820cb65a4e3330397 /fontconfig/src
parent1b73fdf9c9aa2330380300d204fb47f512cfb6e2 (diff)
parent5fb4fb602bde5140dcea45464e3b70a49078ad2e (diff)
downloadvcxsrv-6f066fc9e28c33779b89e7e48e6437965dde9b77.tar.gz
vcxsrv-6f066fc9e28c33779b89e7e48e6437965dde9b77.tar.bz2
vcxsrv-6f066fc9e28c33779b89e7e48e6437965dde9b77.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'fontconfig/src')
-rw-r--r--fontconfig/src/fccfg.c10
-rw-r--r--fontconfig/src/ftglue.c3
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;
}