ports/154852: converters/mpack does not recognize png files
Kurt Lidl
kurt.lidl at cello.com
Thu Feb 17 20:40:07 UTC 2011
>Number: 154852
>Category: ports
>Synopsis: converters/mpack does not recognize png files
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 17 20:40:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Kurt Lidl
>Release: 8.1-Release
>Organization:
Cello Software, LLC
>Environment:
FreeBSD dev01.cello.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The encoded output from mpack on a PNG file will tag it as
application/octet-stream. Ideally, it would be tagged as
image/png.
>How-To-Repeat:
>Fix:
The attached shar file makes the patch-magic.c have the right
data to identify image/png files.
Patch attached with submission follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# /usr/ports/converters/mpack/files/patch-magic.c
#
echo x - /usr/ports/converters/mpack/files/patch-magic.c
sed 's/^X//' >/usr/ports/converters/mpack/files/patch-magic.c << 'b642b52f37529b7136783f89b1ecc98f'
X--- magic.c.orig 2003-07-21 16:35:31.000000000 -0400
X+++ magic.c 2011-02-17 15:17:14.374973627 -0500
X@@ -23,6 +23,7 @@
X * SOFTWARE.
X */
X #include <stdio.h>
X+#include <string.h>
X
X /* Description of the various file formats and their magic numbers */
X struct magic {
X@@ -35,6 +36,7 @@
X static struct magic magic[] = {
X { "image/gif", "GIF", 0 },
X { "image/jpeg", "\377\330\377", 0 },
X+ { "image/png", "\211PNG", 0 },
X { "video/mpeg", "\0\0\001\263", 4 },
X { "application/postscript", "%!", 0 },
X };
b642b52f37529b7136783f89b1ecc98f
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list