diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-03-14 00:44:04 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-03-14 00:44:04 +0000 |
commit | 3803de74844692d1fd51663c1893fdc337a30b34 (patch) | |
tree | 68d7cf0210737b983e2f5af922bdd996aa86ba16 /sys-apps/file/files | |
parent | old (diff) | |
download | historical-3803de74844692d1fd51663c1893fdc337a30b34.tar.gz historical-3803de74844692d1fd51663c1893fdc337a30b34.tar.bz2 historical-3803de74844692d1fd51663c1893fdc337a30b34.zip |
Fix segfault in libmagic #126012.
Package-Manager: portage-2.1_pre6-r2
Diffstat (limited to 'sys-apps/file/files')
-rw-r--r-- | sys-apps/file/files/digest-file-4.17-r1 | 3 | ||||
-rw-r--r-- | sys-apps/file/files/file-4.17-init-mem.patch | 27 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-apps/file/files/digest-file-4.17-r1 b/sys-apps/file/files/digest-file-4.17-r1 new file mode 100644 index 000000000000..8fcb9a4cad58 --- /dev/null +++ b/sys-apps/file/files/digest-file-4.17-r1 @@ -0,0 +1,3 @@ +MD5 50919c65e0181423d66bb25d7fe7b0fd file-4.17.tar.gz 556270 +RMD160 c5fd11659552f8ac3031badc7c94bb3c83a8e916 file-4.17.tar.gz 556270 +SHA256 9c850183b6abef28deb0792d733b6f14a99606197daffa40d4208588f16e0bdf file-4.17.tar.gz 556270 diff --git a/sys-apps/file/files/file-4.17-init-mem.patch b/sys-apps/file/files/file-4.17-init-mem.patch new file mode 100644 index 000000000000..c1ffddeae8a7 --- /dev/null +++ b/sys-apps/file/files/file-4.17-init-mem.patch @@ -0,0 +1,27 @@ +Make sure we init the memory we allocate (file-4.16 did this, but +file-4.17 doesnt). + +http://bugs.gentoo.org/126012 + +--- file-4.17/src/apprentice.c ++++ file-4.17/src/apprentice.c +@@ -380,8 +380,8 @@ apprentice_file(struct magic_set *ms, st + return -1; + } + +- maxmagic = MAXMAGIS; +- if ((marray = malloc(maxmagic * sizeof(*marray))) == NULL) { ++ maxmagic = MAXMAGIS; ++ if ((marray = calloc(maxmagic, sizeof(*marray))) == NULL) { + (void)fclose(f); + file_oomem(ms); + return -1; +@@ -509,7 +509,7 @@ parse(struct magic_set *ms, struct magic + char *t; + private const char *fops = FILE_OPS; + uint32_t val; +- uint32_t cont_level, cont_count; ++ uint32_t cont_level; + + cont_level = 0; + |