diff --git a/file-5.11-magicmgc-home.patch b/file-5.11-magicmgc-home.patch index d7e86ea..9750c27 100644 --- a/file-5.11-magicmgc-home.patch +++ b/file-5.11-magicmgc-home.patch @@ -1,8 +1,8 @@ diff --git a/src/magic.c b/src/magic.c -index 7eb0441..d8c5835 100644 +index 5403951..2b61080 100644 --- a/src/magic.c +++ b/src/magic.c -@@ -101,16 +101,20 @@ get_default_magic(void) +@@ -101,16 +101,21 @@ get_default_magic(void) if ((home = getenv("HOME")) == NULL) return MAGIC; @@ -12,9 +12,9 @@ index 7eb0441..d8c5835 100644 - if (stat(hmagicpath, &st) == -1) - goto out; - if (S_ISDIR(st.st_mode)) { -- free(hmagicpath); -- if (asprintf(&hmagicpath, "%s/%s", home, hmagic) < 0) + if (stat(hmagicpath, &st) == -1) { + free(hmagicpath); +- if (asprintf(&hmagicpath, "%s/%s", home, hmagic) < 0) + if (asprintf(&hmagicpath, "%s/.magic", home) < 0) return MAGIC; - if (access(hmagicpath, R_OK) == -1) diff --git a/file.spec b/file.spec index db162f4..b6a7999 100644 --- a/file.spec +++ b/file.spec @@ -5,7 +5,7 @@ Summary: A utility for determining file types Name: file Version: 5.11 -Release: 8%{?dist} +Release: 9%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -166,6 +166,9 @@ cd python %endif %changelog +* Mon Mar 11 2013 Jan Kaluza - 5.11-9 +- fix #919466 - fix memory leak in get_default_magic + * Wed Feb 13 2013 Fedora Release Engineering - 5.11-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild