[Fontconfig] fontconfig: Branch 'master' - 3 commits
Akira TAGOH
tagoh at kemper.freedesktop.org
Mon Dec 10 21:02:36 PST 2012
src/fcstat.c | 5 ++++-
src/fcstr.c | 2 +-
src/fcxml.c | 1 +
3 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 58040349e8309601b0e5488b8a71cedf03f81415
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Dec 11 12:38:42 2012 +0900
Fix a memory leak
diff --git a/src/fcxml.c b/src/fcxml.c
index 3a94af6..c9d41df 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -1861,6 +1861,7 @@ FcParseDir (FcConfigParse *parse)
if (!data)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
+ data = prefix;
goto bail;
}
if (prefix)
commit 5ea3118ad63787c9a3daa856dd09736aac6f4069
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Dec 11 12:35:02 2012 +0900
Fix a typo that accessing to the out of array
diff --git a/src/fcstr.c b/src/fcstr.c
index 99b59da..cc1465c 100644
--- a/src/fcstr.c
+++ b/src/fcstr.c
@@ -1193,7 +1193,7 @@ FcStrSetAddLangs (FcStrSet *strs, const char *languages)
while ((next = strchr (p, ':')))
{
len = next - p;
- len = FC_MIN (len, 128);
+ len = FC_MIN (len, 127);
strncpy ((char *) lang, p, len);
lang[len] = 0;
/* ignore an empty item */
commit cef2b50c6647582bb128f98f2f78331fbe7dec4e
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Dec 11 12:30:05 2012 +0900
clean up
ret won't be -1 if HAVE_STRUCT_DIRENT_D_TYPE isn't defined.
diff --git a/src/fcstat.c b/src/fcstat.c
index d8663d0..d4431e0 100644
--- a/src/fcstat.c
+++ b/src/fcstat.c
@@ -178,8 +178,9 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
{
struct Adler32 ctx;
struct dirent **files;
- int n, ret = 0;
+ int n;
#ifndef HAVE_STRUCT_DIRENT_D_TYPE
+ int ret = 0;
size_t len = strlen ((const char *)dir);
#endif
@@ -229,8 +230,10 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
free (files[n]);
}
free (files);
+#ifndef HAVE_STRUCT_DIRENT_D_TYPE
if (ret == -1)
return -1;
+#endif
*checksum = Adler32Finish (&ctx);
More information about the Fontconfig
mailing list