From e352b88adf0f7b476b479727864d5c75470bc9af Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Mon, 30 Sep 2019 10:45:33 +0200 Subject: [PATCH] netpbm: update to 10.88.00. --- .../netpbm/files/netpbm-security-code.patch | 69 ------------------- srcpkgs/netpbm/template | 10 +-- 2 files changed, 5 insertions(+), 74 deletions(-) diff --git a/srcpkgs/netpbm/files/netpbm-security-code.patch b/srcpkgs/netpbm/files/netpbm-security-code.patch index 1a0d2438e97..ca74b96dff9 100644 --- a/srcpkgs/netpbm/files/netpbm-security-code.patch +++ b/srcpkgs/netpbm/files/netpbm-security-code.patch @@ -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 - */ - /* - * 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<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 diff --git a/srcpkgs/netpbm/template b/srcpkgs/netpbm/template index b8461039061..acd0ee176a7 100644 --- a/srcpkgs/netpbm/template +++ b/srcpkgs/netpbm/template @@ -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