netpbm: update to 10.88.00.

This commit is contained in:
Leah Neukirchen 2019-09-30 10:45:33 +02:00
parent 6d9b1c40e7
commit e352b88adf
2 changed files with 5 additions and 74 deletions

View File

@ -1016,75 +1016,6 @@ diff -up netpbm-10.58.01/urt/rle_addhist.c.security-code netpbm-10.58.01/urt/rle
++length; /*Cater for the null. */
MALLOCARRAY(newc, length);
diff -up netpbm-10.58.01/urt/rle_hdr.c.security-code netpbm-10.58.01/urt/rle_hdr.c
--- netpbm-10.58.01/urt/rle_hdr.c.security-code 2012-04-09 15:31:45.000000000 +0200
+++ netpbm-10.58.01/urt/rle_hdr.c 2012-04-09 15:40:03.233619414 +0200
@@ -14,6 +14,8 @@
* If you modify this software, you should include a notice giving the
* name of the person performing the modification, the date of modification,
* and the reason for such modification.
+ *
+ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
*/
/*
* rle_hdr.c - Functions to manipulate rle_hdr structures.
@@ -80,7 +82,10 @@ int img_num;
/* Fill in with copies of the strings. */
if ( the_hdr->cmd != pgmname )
{
- char *tmp = (char *)malloc( strlen( pgmname ) + 1 );
+ char *tmp ;
+
+ overflow_add(strlen(pgmname), 1);
+ tmp = malloc( strlen( pgmname ) + 1 );
RLE_CHECK_ALLOC( pgmname, tmp, 0 );
strcpy( tmp, pgmname );
the_hdr->cmd = tmp;
@@ -88,7 +93,9 @@ int img_num;
if ( the_hdr->file_name != fname )
{
- char *tmp = (char *)malloc( strlen( fname ) + 1 );
+ char *tmp;
+ overflow_add(strlen(fname), 1);
+ tmp = malloc( strlen( fname ) + 1 );
RLE_CHECK_ALLOC( pgmname, tmp, 0 );
strcpy( tmp, fname );
the_hdr->file_name = tmp;
@@ -153,6 +160,7 @@ rle_hdr *from_hdr, *to_hdr;
if ( to_hdr->bg_color )
{
int size = to_hdr->ncolors * sizeof(int);
+ overflow2(to_hdr->ncolors, sizeof(int));
to_hdr->bg_color = (int *)malloc( size );
RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->bg_color, "background color" );
memcpy( to_hdr->bg_color, from_hdr->bg_color, size );
@@ -161,7 +169,7 @@ rle_hdr *from_hdr, *to_hdr;
if ( to_hdr->cmap )
{
int size = to_hdr->ncmap * (1 << to_hdr->cmaplen) * sizeof(rle_map);
- to_hdr->cmap = (rle_map *)malloc( size );
+ to_hdr->cmap = (rle_map *)malloc3( to_hdr->ncmap, 1<<to_hdr->cmaplen, sizeof(rle_map));
RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->cmap, "color map" );
memcpy( to_hdr->cmap, from_hdr->cmap, size );
}
@@ -174,11 +182,16 @@ rle_hdr *from_hdr, *to_hdr;
int size = 0;
CONST_DECL char **cp;
for ( cp=to_hdr->comments; *cp; cp++ )
+ {
+ overflow_add(size, 1);
size++; /* Count the comments. */
+ }
/* Check if there are really any comments. */
if ( size )
{
+ overflow_add(size, 1);
size++; /* Copy the NULL pointer, too. */
+ overflow2(size, sizeof(char *));
size *= sizeof(char *);
to_hdr->comments = (CONST_DECL char **)malloc( size );
RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->comments, "comments" );
diff -up netpbm-10.58.01/urt/rle.h.security-code netpbm-10.58.01/urt/rle.h
--- netpbm-10.58.01/urt/rle.h.security-code 2012-04-09 15:31:45.000000000 +0200
+++ netpbm-10.58.01/urt/rle.h 2012-04-09 15:40:03.233619414 +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.87.02
version=10.88.00
revision=1
_githash=bafee11c8c3763c5ea2c9c1365f63c321062b25e
_githash_guide=4bc0b5cdf53e473254bfa5ca3e35729e06c3cdcc
_githash=ba9611399c049edc878be544d2a91f7178dce3dd
_githash_guide=4d6a81f76b3eeab25441f7614083bbb82328499c
create_wrksrc=yes
build_wrksrc="netpbm-mirror-${_githash}"
hostmakedepends="pkg-config perl python flex"
@ -16,8 +16,8 @@ license="BSD,GPL-2,custom"
homepage="http://netpbm.sourceforge.net/"
distfiles="https://github.com/leahneukirchen/netpbm-mirror/archive/${_githash}.tar.gz
https://github.com/leahneukirchen/netpbm-mirror/archive/${_githash_guide}.tar.gz"
checksum="85830dfadea92117e7a8da22cf54960ba3e9b7a6b139361ee36dd7c48853ba4d
ef8e01c205c61a515b9d3e7b5ebe8b5d242d11ac27d2db6387810b8dcde594b4"
checksum="01faa24feff72346f77091a24ac40cea600428439837a25b692897a3bde1d4bb
b912e8bfcfd98d931b37e130d113e86d0656922059ea451a37d88e218f865fb5"
post_extract() {
cd $build_wrksrc