diff options
author | is <is> | 2016-08-11 22:48:00 +0000 |
---|---|---|
committer | is <is> | 2016-08-11 22:48:00 +0000 |
commit | a9c271fc07bfbd86fb161b10b6740d1a9b8b71e6 (patch) | |
tree | 1abdb4e92d5eb031e440a68d8200a8bd6db0e20b /graphics/netpbm | |
parent | 214f1cc90f5f5127445caa2ac9ff604d11850724 (diff) | |
download | pkgsrc-a9c271fc07bfbd86fb161b10b6740d1a9b8b71e6.tar.gz |
Fix bus error on little-endian architectures with strict alignment.
Diffstat (limited to 'graphics/netpbm')
-rw-r--r-- | graphics/netpbm/Makefile | 7 | ||||
-rw-r--r-- | graphics/netpbm/distinfo | 4 | ||||
-rw-r--r-- | graphics/netpbm/patches/patch-converter_other_giftopnm.c | 16 |
3 files changed, 22 insertions, 5 deletions
diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile index 6d3aeb3ad75..5ce097ddcdf 100644 --- a/graphics/netpbm/Makefile +++ b/graphics/netpbm/Makefile @@ -1,9 +1,12 @@ -# $NetBSD: Makefile,v 1.209 2016/07/09 06:38:22 wiz Exp $ +# $NetBSD: Makefile,v 1.210 2016/08/11 22:48:00 is Exp $ + +TEST_TARGETS= test DISTNAME= netpbm-10.68.02 CATEGORIES= graphics MASTER_SITES= # -PKGREVISION= 4 +PKGREVISION= 5 + # manually created from svn checkout of # svn checkout http://svn.code.sf.net/p/netpbm/code/advanced netpbm # tar --exclude netpbm/.svn/\* -cvzf /archive/distfiles/netpbm-$VERSION.tar.gz netpbm diff --git a/graphics/netpbm/distinfo b/graphics/netpbm/distinfo index 28350a6933f..6b527ac4cc2 100644 --- a/graphics/netpbm/distinfo +++ b/graphics/netpbm/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.102 2016/05/16 21:23:31 richard Exp $ +$NetBSD: distinfo,v 1.103 2016/08/11 22:48:00 is Exp $ SHA1 (netpbm-10.68.02.tar.gz) = 90fa87549dc7fb33bd7f9f29abad09fe99faf3e1 RMD160 (netpbm-10.68.02.tar.gz) = 7567eb6c38f06ad89b995b9315deec91db94bfb0 @@ -9,7 +9,7 @@ RMD160 (netpbm-docs-r2313.tar.gz) = 03854f545c7c0f4c825ee08bc779b62da0ea05c3 SHA512 (netpbm-docs-r2313.tar.gz) = 978f7e154aadfa2c4332c07f8e822ec1990697c22b4a3b56f5de434a1f249a6b552c6a76763d0ce2684dfbd5d14973bf0b05702dd0ad543c6f440a992bcac0d9 Size (netpbm-docs-r2313.tar.gz) = 447907 bytes SHA1 (patch-common.mk) = f590cc66e0fe6a07e848b9b46662bca350557bea -SHA1 (patch-converter_other_giftopnm.c) = d64d645307e12b32d3a9ce56885bbfb3a4a80d23 +SHA1 (patch-converter_other_giftopnm.c) = 444fd73c239279a94481a2163a9e31d340af1a15 SHA1 (patch-lib_Makefile) = 3f93bd24c53aa1f22aa43545d7ca5422af8e78ca SHA1 (patch-pm__config.in.h) = c6d51bbdf6c1f7725f08f321591038e296761e61 SHA1 (patch-wordaccess_be_aligned.h) = 7cc5cd1126f65b3307393c978ac9ff4a49d666de diff --git a/graphics/netpbm/patches/patch-converter_other_giftopnm.c b/graphics/netpbm/patches/patch-converter_other_giftopnm.c index 9966f70e42a..6a8d0304e1f 100644 --- a/graphics/netpbm/patches/patch-converter_other_giftopnm.c +++ b/graphics/netpbm/patches/patch-converter_other_giftopnm.c @@ -1,4 +1,4 @@ -$NetBSD: patch-converter_other_giftopnm.c,v 1.1 2015/01/25 15:01:48 jperkin Exp $ +$NetBSD: patch-converter_other_giftopnm.c,v 1.2 2016/08/11 22:48:00 is Exp $ Fix "giftopnm.c:368: error: incompatible types in assignment". @@ -13,3 +13,17 @@ Fix "giftopnm.c:368: error: incompatible types in assignment". *eofP = TRUE; *lengthP = 0; } else { +@@ -671,10 +671,13 @@ bitsOfLeBuffer(const unsigned char * con + + assert(len <= 16); + ++/* should be UNALIGNED_OK, but that'd need fixing, too */ ++#if defined(__vax__) || defined(__i486__) || defined(__x86_64__) + if (BYTE_ORDER == LITTLE_ENDIAN) + /* Fast path */ + codeBlock = *(uint32_t *) & buf[start/8]; + else ++#endif + /* logic works for little endian too */ + codeBlock = + (buf[start/8+0] << 0) | |