extra/netpbm to 10.67.00-1

This commit is contained in:
Kevin Mihelich 2014-07-09 02:40:20 +00:00
parent be1623a86d
commit 758463810d
2 changed files with 48 additions and 54 deletions

View file

@ -5,34 +5,29 @@
# - add armv7h for -fPIC flag
pkgname=netpbm
pkgver=10.66.03
pkgver=10.67.00
pkgrel=1
pkgdesc="A toolkit for manipulation of graphic images"
arch=('i686' 'x86_64')
license=('custom' 'BSD' 'GPL' 'LGPL')
url="http://netpbm.sourceforge.net/"
depends=('perl' 'libpng' 'libtiff' 'libxml2')
makedepends=('python2')
makedepends=('python2' 'jbigkit')
options=('!makeflags')
source=(ftp://ftp.archlinux.org/other/packages/netpbm/${pkgname}-${pkgver}.tar.xz{,.sig} \
ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig} \
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
source=(svn://svn.code.sf.net/p/netpbm/code/advanced
ftp://ftp.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
sha1sums=('b396dfde402b6979a8b551cf60ba1030278a233d'
'SKIP'
sha1sums=('SKIP'
'25a58975bd8cd383238b4ae31f4405c60914faac'
'SKIP'
'b79cf9d42488fea065ba16262ed97694c47af08d'
'4213468c44a63c0575896f6781987a09cfcc2d30'
'4e9d91516d79d2099ba4bd47434e6bb12c52bcc4'
'c67a63c010353de3ecac3ad72ba76bbb85e4ed4c')
# source PKGBUILD && mksource
mksource() {
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
svn checkout svn://svn.code.sf.net/p/netpbm/code/advanced advanced
_pkgver=$(grep MAJOR advanced/version.mk |cut -d ' ' -f 3).$(grep MINOR advanced/version.mk |cut -d ' ' -f 3).0$(grep POINT advanced/version.mk |cut -d ' ' -f 3)
tar -cf ${pkgname}-${_pkgver}.tar.xz advanced
gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${_pkgver}.tar.xz
rm -r advanced
pkgver() {
cd advanced
echo $(grep MAJOR version.mk |cut -d ' ' -f 3).$(grep MINOR version.mk |cut -d ' ' -f 3).0$(grep POINT version.mk |cut -d ' ' -f 3)
}
prepare() {
@ -52,6 +47,7 @@ prepare() {
echo 'JPEGLIB = libjpeg.so' >> config.mk
echo 'PNGLIB = libpng.so' >> config.mk
echo 'ZLIB = libz.so' >> config.mk
echo 'JBIGLIB = /usr/lib/libjbig.a' >> config.mk
sed -i 's|misc|share/netpbm|' common.mk
sed -i 's|/link|/lib|' lib/Makefile

View file

@ -151,26 +151,6 @@ diff -up netpbm-10.58.01/converter/other/pnmtorle.c.security-code netpbm-10.58.0
*/
/*
* pnmtorle - A program which will convert pbmplus (ppm or pgm) images
diff -up netpbm-10.58.01/converter/other/pnmtosgi.c.security-code netpbm-10.58.01/converter/other/pnmtosgi.c
--- netpbm-10.58.01/converter/other/pnmtosgi.c.security-code 2012-04-09 15:31:42.000000000 +0200
+++ netpbm-10.58.01/converter/other/pnmtosgi.c 2012-04-09 15:40:03.188619976 +0200
@@ -254,6 +254,7 @@ build_channels(FILE * const ifp, int con
#endif
if( storage != STORAGE_VERBATIM ) {
+ overflow2(channels, rows);
MALLOCARRAY_NOFAIL(table, channels * rows);
MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
}
@@ -306,6 +307,8 @@ compress(ScanElem * temp,
break;
case STORAGE_RLE:
tabrow = chan_no * rows + row;
+ overflow2(chan_no, rows);
+ overflow_add(chan_no* rows, row);
len = rle_compress(temp, cols); /* writes result into rletemp */
channel[chan_no][row].length = len;
MALLOCARRAY(p, len);
diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.01/converter/other/rletopnm.c
--- netpbm-10.58.01/converter/other/rletopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200
+++ netpbm-10.58.01/converter/other/rletopnm.c 2012-04-09 15:40:03.189619963 +0200
@ -183,25 +163,6 @@ diff -up netpbm-10.58.01/converter/other/rletopnm.c.security-code netpbm-10.58.0
*/
/*
* rletopnm - A conversion program to convert from Utah's "rle" image format
diff -up netpbm-10.58.01/converter/other/sgitopnm.c.security-code netpbm-10.58.01/converter/other/sgitopnm.c
--- netpbm-10.58.01/converter/other/sgitopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200
+++ netpbm-10.58.01/converter/other/sgitopnm.c 2012-04-09 15:40:03.189619963 +0200
@@ -359,10 +359,14 @@ readChannels(FILE * const ifP,
MALLOCARRAY_NOFAIL(image, head->ysize);
} else {
maxchannel = MIN(3, head->zsize);
+ overflow2(head->ysize, maxchannel);
MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
}
- if (table)
+ if (table) {
+ overflow2(head->xsize, 2);
+ overflow_add(head->xsize*2, 2);
MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
+ }
for (channel = 0; channel < maxchannel; ++channel) {
unsigned int row;
diff -up netpbm-10.58.01/converter/other/sirtopnm.c.security-code netpbm-10.58.01/converter/other/sirtopnm.c
--- netpbm-10.58.01/converter/other/sirtopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200
+++ netpbm-10.58.01/converter/other/sirtopnm.c 2012-04-09 15:40:03.190619951 +0200
@ -1658,3 +1619,40 @@ diff -up netpbm-10.58.01/urt/scanargs.c.security-code netpbm-10.58.01/urt/scanar
MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
for (i = 0; i <= oldmaxval; ++i)
table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
--- netpbm-10.58.01/converter/other/sgitopnm.c.orig 2014-07-08 16:57:30.878754976 -0400
+++ netpbm-10.58.01/converter/other/sgitopnm.c 2014-07-08 17:07:52.727745725 -0400
@@ -372,10 +372,14 @@
MALLOCARRAY_NOFAIL(image, head->ysize);
} else {
maxchannel = 3;
+ overflow2(head->ysize, maxchannel);
MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
}
- if (table)
+ if (table) {
+ overflow2(head->xsize, 2);
+ overflow_add(head->xsize*2, 2);
MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
+ }
for (channel = 0; channel < maxchannel; ++channel) {
unsigned int row;
--- netpbm-10.58.01/converter/other/pnmtosgi.c.orig 2014-07-08 16:57:30.878754976 -0400
+++ netpbm-10.58.01/converter/other/pnmtosgi.c 2014-07-08 17:11:55.164018919 -0400
@@ -176,6 +176,8 @@
break;
case STORAGE_RLE: {
unsigned int const tabrow = chanNum * rows + row;
+ overflow2(chanNum, rows);
+ overflow_add(chanNum* rows, row);
unsigned int const len = rleCompress(tempArg, cols);
/* writes result into rletemp */
unsigned int i;
@@ -212,6 +214,7 @@
ScanElem * temp;
if (storage != STORAGE_VERBATIM) {
+ overflow2(channels, rows);
MALLOCARRAY_NOFAIL(table, channels * rows);
MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
} else