New upstream release.
This commit is contained in:
parent
a49dc69446
commit
0898950560
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ fontconfig-2.8.0.tar.gz
|
||||
/fontconfig-2.10.93.tar.bz2
|
||||
/fontconfig-2.10.94.tar.bz2
|
||||
/fontconfig-2.10.95.tar.bz2
|
||||
/fontconfig-2.11.0.tar.bz2
|
||||
|
@ -1,69 +0,0 @@
|
||||
From a61e145304da86c8c35b137493bbd8fd5dd1e7f5 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Mon, 9 Sep 2013 19:59:31 +0900
|
||||
Subject: [PATCH] Fix memory leaks in FcFreeTypeQueryFace
|
||||
|
||||
---
|
||||
src/fcfreetype.c | 15 ++++++++++-----
|
||||
1 file changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
|
||||
index 02e85cb..e394307 100644
|
||||
--- a/src/fcfreetype.c
|
||||
+++ b/src/fcfreetype.c
|
||||
@@ -1105,7 +1105,6 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||
const char *tmp;
|
||||
|
||||
FcChar8 *hashstr = NULL;
|
||||
- char *fontdata = NULL;
|
||||
FT_Error err;
|
||||
FT_ULong len = 0, alen;
|
||||
|
||||
@@ -1668,15 +1667,21 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||
err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
|
||||
if (err == FT_Err_Ok)
|
||||
{
|
||||
+ char *fontdata;
|
||||
+
|
||||
alen = (len + 63) & ~63;
|
||||
fontdata = malloc (alen);
|
||||
if (!fontdata)
|
||||
goto bail3;
|
||||
err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len);
|
||||
if (err != FT_Err_Ok)
|
||||
+ {
|
||||
+ free (fontdata);
|
||||
goto bail3;
|
||||
+ }
|
||||
memset (&fontdata[len], 0, alen - len);
|
||||
hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len);
|
||||
+ free (fontdata);
|
||||
}
|
||||
else if (err == FT_Err_Invalid_Face_Handle)
|
||||
{
|
||||
@@ -1692,7 +1697,11 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||
if (hashstr)
|
||||
{
|
||||
if (!FcPatternAddString (pat, FC_HASH, hashstr))
|
||||
+ {
|
||||
+ free (hashstr);
|
||||
goto bail1;
|
||||
+ }
|
||||
+ free (hashstr);
|
||||
}
|
||||
bail3:
|
||||
|
||||
@@ -1783,10 +1792,6 @@ bail3:
|
||||
bail2:
|
||||
FcCharSetDestroy (cs);
|
||||
bail1:
|
||||
- if (hashstr)
|
||||
- free (hashstr);
|
||||
- if (fontdata)
|
||||
- free (fontdata);
|
||||
FcPatternDestroy (pat);
|
||||
bail0:
|
||||
return NULL;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 3e5f70a16ac6d54f1e01c92ddaa5985deec1b7f9 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Mon, 2 Sep 2013 20:51:46 +0900
|
||||
Subject: [PATCH] Do not create a config dir for migration when no config files
|
||||
nor dirs
|
||||
|
||||
---
|
||||
src/fcxml.c | 15 ++++++++++-----
|
||||
1 file changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/fcxml.c b/src/fcxml.c
|
||||
index b464b4e..8ff10b6 100644
|
||||
--- a/src/fcxml.c
|
||||
+++ b/src/fcxml.c
|
||||
@@ -2233,11 +2233,6 @@ FcParseInclude (FcConfigParse *parse)
|
||||
/* No config dir nor file on the XDG directory spec compliant place
|
||||
* so need to guess what it is supposed to be.
|
||||
*/
|
||||
- FcChar8 *parent = FcStrDirname (s);
|
||||
-
|
||||
- if (!FcFileIsDir (parent))
|
||||
- FcMakeDirectory (parent);
|
||||
- FcStrFree (parent);
|
||||
if (FcStrStr (s, (const FcChar8 *)"conf.d") != NULL)
|
||||
goto userdir;
|
||||
else
|
||||
@@ -2259,6 +2254,11 @@ FcParseInclude (FcConfigParse *parse)
|
||||
{
|
||||
if (FcFileIsDir (filename))
|
||||
{
|
||||
+ FcChar8 *parent = FcStrDirname (userdir);
|
||||
+
|
||||
+ if (!FcFileIsDir (parent))
|
||||
+ FcMakeDirectory (parent);
|
||||
+ FcStrFree (parent);
|
||||
if (FcFileIsDir (userdir) ||
|
||||
rename ((const char *)filename, (const char *)userdir) != 0 ||
|
||||
symlink ((const char *)userdir, (const char *)filename) != 0)
|
||||
@@ -2272,6 +2272,11 @@ FcParseInclude (FcConfigParse *parse)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ FcChar8 *parent = FcStrDirname (userconf);
|
||||
+
|
||||
+ if (!FcFileIsDir (parent))
|
||||
+ FcMakeDirectory (parent);
|
||||
+ FcStrFree (parent);
|
||||
if (FcFileIsFile (userconf) ||
|
||||
rename ((const char *)filename, (const char *)userconf) != 0 ||
|
||||
symlink ((const char *)userconf, (const char *)filename) != 0)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -16,8 +16,6 @@ Source1: 25-no-bitmap-fedora.conf
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=140335
|
||||
Patch0: fontconfig-2.8.0-sleep-less.patch
|
||||
Patch1: fontconfig-no-dir-when-no-conf.patch
|
||||
Patch2: fontconfig-fix-memleak.patch
|
||||
|
||||
BuildRequires: expat-devel
|
||||
BuildRequires: freetype-devel >= %{freetype_version}
|
||||
@ -59,8 +57,6 @@ which is useful for developing applications that uses fontconfig.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .sleep-less
|
||||
%patch1 -p1 -b .nodir
|
||||
%patch2 -p1 -b .memleak
|
||||
|
||||
%build
|
||||
# We don't want to rebuild the docs, but we want to install the included ones.
|
||||
@ -137,6 +133,9 @@ fi
|
||||
%doc fontconfig-devel.txt fontconfig-devel
|
||||
|
||||
%changelog
|
||||
* Fri Oct 11 2013 Akira TAGOH <tagoh@redhat.com> - 2.11.0-1
|
||||
- New upstream release.
|
||||
|
||||
* Fri Sep 13 2013 Akira TAGOH <tagoh@redhat.com> - 2.10.95-4
|
||||
- Fix memory leaks in FcFreeTypeQueryFace().
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user