pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/netpbm Fix bus error on little-endian archite...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3d8d7e069118
branches:  trunk
changeset: 351010:3d8d7e069118
user:      is <is%pkgsrc.org@localhost>
date:      Thu Aug 11 22:48:00 2016 +0000

description:
Fix bus error on little-endian architectures with strict alignment.

diffstat:

 graphics/netpbm/Makefile                                 |   7 +++++--
 graphics/netpbm/distinfo                                 |   4 ++--
 graphics/netpbm/patches/patch-converter_other_giftopnm.c |  16 +++++++++++++++-
 3 files changed, 22 insertions(+), 5 deletions(-)

diffs (63 lines):

diff -r 2bda1fdda0c3 -r 3d8d7e069118 graphics/netpbm/Makefile
--- a/graphics/netpbm/Makefile  Thu Aug 11 15:34:29 2016 +0000
+++ b/graphics/netpbm/Makefile  Thu Aug 11 22:48:00 2016 +0000
@@ -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 -r 2bda1fdda0c3 -r 3d8d7e069118 graphics/netpbm/distinfo
--- a/graphics/netpbm/distinfo  Thu Aug 11 15:34:29 2016 +0000
+++ b/graphics/netpbm/distinfo  Thu Aug 11 22:48:00 2016 +0000
@@ -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 @@
 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 -r 2bda1fdda0c3 -r 3d8d7e069118 graphics/netpbm/patches/patch-converter_other_giftopnm.c
--- a/graphics/netpbm/patches/patch-converter_other_giftopnm.c  Thu Aug 11 15:34:29 2016 +0000
+++ b/graphics/netpbm/patches/patch-converter_other_giftopnm.c  Thu Aug 11 22:48:00 2016 +0000
@@ -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 @@
          *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) |



Home | Main Index | Thread Index | Old Index