netpbm: update to 10.85.00.

This commit is contained in:
Leah Neukirchen 2019-01-02 16:15:19 +01:00
parent baeda35135
commit 7102d5257b
2 changed files with 5 additions and 89 deletions

View File

@ -27,17 +27,6 @@ diff -up netpbm-10.58.01/analyzer/pgmtexture.c.security-code netpbm-10.58.01/ana
/* allocate rows and set pointers to them */
for (i = nrl; i <= nrh; ++i) {
MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1));
diff -up netpbm-10.58.01/converter/other/gemtopnm.c.security-code netpbm-10.58.01/converter/other/gemtopnm.c
--- netpbm-10.58.01/converter/other/gemtopnm.c.security-code 2012-04-09 15:31:42.000000000 +0200
+++ netpbm-10.58.01/converter/other/gemtopnm.c 2012-04-09 15:40:03.183620040 +0200
@@ -106,6 +106,7 @@ main(argc, argv)
pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 );
+ overflow_add(cols, padright);
{
/* allocate input row data structure */
int plane;
diff -up netpbm-10.58.01/converter/other/jpegtopnm.c.security-code netpbm-10.58.01/converter/other/jpegtopnm.c
--- netpbm-10.58.01/converter/other/jpegtopnm.c.security-code 2012-04-09 15:31:40.000000000 +0200
+++ netpbm-10.58.01/converter/other/jpegtopnm.c 2012-04-09 15:40:03.184620028 +0200
@ -288,27 +277,6 @@ diff -up netpbm-10.58.01/converter/pbm/pbmtomda.c.security-code netpbm-10.58.01/
nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4;
/* MDA wants rows a multiple of 4 */
nOutCols = nInCols / 8;
diff -up netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c.security-code netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c
--- netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c.security-code 2012-04-09 15:31:45.000000000 +0200
+++ netpbm-10.58.01/converter/pbm/pbmtoppa/pbm.c 2012-04-09 15:40:03.195619889 +0200
@@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned
return 0;
case P4:
+ overflow_add(pbm->width, 7);
tmp=(pbm->width+7)/8;
tmp2=fread(data,1,tmp,pbm->fptr);
if(tmp2 == tmp)
@@ -129,7 +130,8 @@ void pbm_unreadline (pbm_stat *pbm, void
return;
pbm->unread = 1;
- pbm->revdata = malloc ((pbm->width+7)/8);
+ overflow_add(pbm->width, 7);
+ pbm->revdata = malloc((pbm->width+7)/8);
memcpy (pbm->revdata, data, (pbm->width+7)/8);
pbm->current_line--;
}
diff -up netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c.security-code netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c
--- netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c.security-code 2012-04-09 15:31:45.000000000 +0200
+++ netpbm-10.58.01/converter/pbm/pbmtoppa/pbmtoppa.c 2012-04-09 15:40:03.196619876 +0200
@ -530,58 +498,6 @@ diff -up netpbm-10.58.01/converter/ppm/picttoppm.c.security-code netpbm-10.58.01
/*
* picttoppm.c -- convert a MacIntosh PICT file to PPM format.
*
diff -up netpbm-10.58.01/converter/ppm/pjtoppm.c.security-code netpbm-10.58.01/converter/ppm/pjtoppm.c
--- netpbm-10.58.01/converter/ppm/pjtoppm.c.security-code 2012-04-09 15:31:44.000000000 +0200
+++ netpbm-10.58.01/converter/ppm/pjtoppm.c 2012-04-09 15:40:03.206619751 +0200
@@ -127,19 +127,21 @@ main(argc, argv)
case 'V': /* send plane */
case 'W': /* send last plane */
if (rows == -1 || r >= rows || image == NULL) {
- if (rows == -1 || r >= rows)
+ if (rows == -1 || r >= rows) {
+ overflow_add(rows, 100);
rows += 100;
+ }
if (image == NULL) {
- MALLOCARRAY(image, rows * planes);
- MALLOCARRAY(imlen, rows * planes);
+ image = (unsigned char **)
+ malloc3(rows , planes , sizeof(unsigned char *));
+ imlen = (int *) malloc3(rows , planes, sizeof(int));
}
else {
+ overflow2(rows,planes);
image = (unsigned char **)
- realloc(image,
- rows * planes *
+ realloc2(image, rows * planes,
sizeof(unsigned char *));
- imlen = (int *)
- realloc(imlen, rows * planes * sizeof(int));
+ imlen = (int *) realloc2(imlen, rows * planes, sizeof(int));
}
}
if (image == NULL || imlen == NULL)
@@ -212,8 +214,10 @@ main(argc, argv)
for (i = 0, c = 0; c < imlen[p + r * planes]; c += 2)
for (cmd = image[p + r * planes][c],
val = image[p + r * planes][c+1];
- cmd >= 0 && i < newcols; cmd--, i++)
+ cmd >= 0 && i < newcols; cmd--, i++) {
buf[i] = val;
+ overflow_add(i, 1);
+ }
cols = cols > i ? cols : i;
free(image[p + r * planes]);
/*
@@ -224,6 +228,7 @@ main(argc, argv)
image[p + r * planes] = (unsigned char *) realloc(buf, i);
}
}
+ overflow2(cols, 8);
cols *= 8;
}
diff -up netpbm-10.58.01/converter/ppm/ppmtoeyuv.c.security-code netpbm-10.58.01/converter/ppm/ppmtoeyuv.c
--- netpbm-10.58.01/converter/ppm/ppmtoeyuv.c.security-code 2012-04-09 15:31:42.000000000 +0200
+++ netpbm-10.58.01/converter/ppm/ppmtoeyuv.c 2012-04-09 15:40:03.206619751 +0200

View File

@ -1,10 +1,10 @@
# Template file for 'netpbm'
pkgname=netpbm
# from http://svn.code.sf.net/p/netpbm/code/advanced/doc/HISTORY
version=10.84.05
version=10.85.00
revision=1
_githash=ebf403d4015d30f19a37895efdce201300c9b418
_githash_guide=18fa5dc553c7645f08e1f0e826f6886f7cc775fe
_githash=ee250e7490cbb3550fed22fdb98b7152cce20b72
_githash_guide=5d9d0c2bdae252705efcd07ff7601acdc80ff2bd
create_wrksrc=yes
build_wrksrc="netpbm-mirror-${_githash}"
hostmakedepends="pkg-config perl python flex"
@ -17,8 +17,8 @@ homepage="http://netpbm.sourceforge.net/"
nocross=yes
distfiles="https://github.com/chneukirchen/netpbm-mirror/archive/${_githash}.tar.gz
https://github.com/chneukirchen/netpbm-mirror/archive/${_githash_guide}.tar.gz"
checksum="e6e0fb08540c86498f5da1f53d863f43c1d56af0ed33cc131e566f7e3b0a8490
4d2560c0f8800fdd01b596612252e53f7598009b8fb48e75aef1e10c322f2e38"
checksum="a6264de949ea682a57736f9ab72bd23338d38992fa7f069924d4f60647cf4d83
7ff30f060acef3f53d9003149bd88771c17c14551dfc907e99065407b805192e"
post_extract() {
cd $build_wrksrc