mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-09 15:27:13 +08:00
6th group of libpng update, made librsvg & imagemagick part of this group, majot .so up for image, ghostscript, libwmf, netpbm
This commit is contained in:
parent
49e8345393
commit
2c39d17701
@ -1,26 +1,21 @@
|
||||
#
|
||||
# Platform Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
# maintainer abveritas@chakra-project.org
|
||||
|
||||
pkgname=ghostscript
|
||||
pkgver=9.05
|
||||
pkgver=9.06
|
||||
pkgrel=1
|
||||
pkgdesc="An interpreter for the PostScript language"
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('x86_64')
|
||||
license=('GPL3' 'custom')
|
||||
depends=('libxt' 'libcups' 'fontconfig' 'jasper' 'zlib' 'libpng' 'libjpeg' 'libtiff' 'lcms')
|
||||
makedepends=('gnutls')
|
||||
optdepends=('texlive-core: needed for dvipdf')
|
||||
url="http://www.ghostscript.com/"
|
||||
source=(http://downloads.ghostscript.com/public/ghostscript-${pkgver}.tar.bz2)
|
||||
source=("http://downloads.ghostscript.com/public/ghostscript-${pkgver}.tar.bz2")
|
||||
options=('!libtool' '!makeflags')
|
||||
md5sums=('8bcef1f33ddf8a4d12b2cf8da385c191')
|
||||
md5sums=('46f9ebe40dc52755287b30704270db11')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/ghostscript-${pkgver}
|
||||
@ -41,6 +36,7 @@ build() {
|
||||
--enable-freetype \
|
||||
--without-luratech \
|
||||
--disable-compile-inits \
|
||||
--with-system-libtiff \
|
||||
--disable-gtk
|
||||
|
||||
make
|
||||
|
@ -1,199 +0,0 @@
|
||||
2010-03-30 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.6.0.10-1
|
||||
* Upstream update
|
||||
* Removed bootstrapping to fix linking problem (no longer necessary)
|
||||
* Enabled modules, some depends are now optdepends
|
||||
|
||||
2010-02-26 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.6.0.0-1
|
||||
* Upstream update
|
||||
|
||||
2010-02-14 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.9.5-1
|
||||
* Upstream update
|
||||
|
||||
2010-01-18 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.9.0-2
|
||||
* Fixed undefined symbols
|
||||
|
||||
2010-01-14 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.9.0-1
|
||||
* Upstream update
|
||||
|
||||
2009-12-12 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.8.5-1
|
||||
* Upstream update
|
||||
|
||||
2009-11-22 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.7.10-1
|
||||
* Upstream update
|
||||
|
||||
2009-11-08 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.7.5-1
|
||||
* Upstream update
|
||||
|
||||
2009-10-14 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.6.10-1
|
||||
* Upstream update
|
||||
|
||||
2009-09-18 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.6.1-1
|
||||
* Upstream update
|
||||
|
||||
2009-09-02 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.5.6-1
|
||||
* Upstream update
|
||||
|
||||
2009-08-05 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.4.8-1
|
||||
* Upstream update
|
||||
|
||||
2009-07-23 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.4.5-1
|
||||
* Upstream update
|
||||
|
||||
2009-06-05 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.3.2-1
|
||||
* Upstream update
|
||||
* Removed insecure RPATH (close FS#14843)
|
||||
|
||||
2009-05-21 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.2.7-1
|
||||
* Upstream update
|
||||
|
||||
2009-04-29 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.1.9-1
|
||||
* Upstream update
|
||||
|
||||
2009-03-31 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.0.10-1
|
||||
* Upstream update
|
||||
|
||||
2009-03-17 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.5.0.1-1
|
||||
* Upstream update
|
||||
|
||||
2009-02-27 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.9.7-1
|
||||
* Upstream update
|
||||
|
||||
2009-02-07 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.9.2-1
|
||||
* Upstream update
|
||||
|
||||
2009-01-30 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.8.10-1
|
||||
* Upstream update
|
||||
|
||||
2008-12-29 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.8.2-1
|
||||
* Upstream update
|
||||
|
||||
2008-12-14 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.7.8-1
|
||||
* Upstream update
|
||||
|
||||
2008-12-05 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.7.0-1
|
||||
* Upstream update
|
||||
* Rebuild against heimdal 1.2.1
|
||||
|
||||
2008-11-25 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.6.3-1
|
||||
* Upstream update
|
||||
|
||||
2008-11-14 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.5.6-1
|
||||
* Upstream update
|
||||
|
||||
2008-10-26 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.5.0-1
|
||||
* Upstream update
|
||||
|
||||
2008-10-18 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.4.9-1
|
||||
* Upstream update
|
||||
|
||||
2008-10-03 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.4.1-1
|
||||
* Upstream update
|
||||
|
||||
2008-09-06 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.3.6-1
|
||||
* Upstream update
|
||||
* Added JPEG2000 support (close FS#10544)
|
||||
|
||||
2008-08-19 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.2.10-1
|
||||
* Upstream update
|
||||
|
||||
2008-08-11 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.2.7-1
|
||||
* Upstream update
|
||||
* Added bzip2 and libxml2 depends
|
||||
* Disabled docs
|
||||
|
||||
2008-07-18 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.2.4-1
|
||||
* Upstream update
|
||||
|
||||
2008-06-23 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.2.1-1
|
||||
* Upstream update
|
||||
* Fixed linking problem (close FS#10574)
|
||||
|
||||
2008-05-19 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.1.3-1
|
||||
* Upstream update
|
||||
|
||||
2008-04-30 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.1.0-1
|
||||
* Upstream update
|
||||
|
||||
2008-04-24 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.0.9-1
|
||||
* Upstream update
|
||||
|
||||
2008-03-29 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* imagemagick 6.4.0.2-1
|
||||
* Upstream update
|
||||
* Added dvips to delegates list for dvi support (close FS#8914)
|
||||
* Added ChangeLog
|
@ -4,42 +4,35 @@
|
||||
# maintainer abveritas@chakra-project.org
|
||||
|
||||
pkgname=imagemagick
|
||||
pkgver=6.6.6.10
|
||||
pkgrel=2
|
||||
pkgver=6.8.0.3
|
||||
pkgrel=1
|
||||
pkgdesc="An image viewing/manipulation program"
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('x86_64')
|
||||
url="http://www.imagemagick.org/"
|
||||
license=('custom')
|
||||
depends=('libtool' 'lcms' 'lcms2' 'libxt' 'gcc-libs' 'bzip2' 'freetype2' 'fontconfig'
|
||||
'libxext' 'fftw' 'liblqr' 'libwmf' 'librsvg' 'libxml2' )
|
||||
depends=('libltdl' 'lcms' 'lcms2' 'libxt' 'gcc-libs' 'bzip2' 'freetype2' 'fontconfig'
|
||||
'libxext' 'fftw' 'liblqr' 'libwmf' 'librsvg' 'libxml2' 'perl' )
|
||||
makedepends=('ghostscript' 'openexr' 'jasper')
|
||||
optdepends=('ghostscript: for Ghostscript support'
|
||||
'openexr: for OpenEXR support'
|
||||
'jasper: for JPEG-2000 support')
|
||||
options=('!makeflags' '!docs')
|
||||
#source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \
|
||||
source=(http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.6/ImageMagick-6.6.6-10.tar.gz
|
||||
libpng_mmx_patch_x86_64.patch
|
||||
perlmagick.rpath.patch)
|
||||
md5sums=('1eead645376210cfe473ebe89c4a1b89'
|
||||
'069980fc2590c02aed86420996259302'
|
||||
'ff9974decbfe9846f8e347239d87e4eb')
|
||||
source=("http://sourceforge.net/projects/imagemagick/files/6.8.0-sources/ImageMagick-6.8.0-3.tar.xz"
|
||||
'perlmagick.rpath.patch')
|
||||
md5sums=('3b985a05f95768767649820ab21e2060'
|
||||
'ff9974decbfe9846f8e347239d87e4eb')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/ImageMagick-${pkgver%.*}-${pkgver##*.}
|
||||
|
||||
if [ "${CARCH}" = 'x86_64' ]; then
|
||||
patch -p1 < ../libpng_mmx_patch_x86_64.patch
|
||||
fi
|
||||
|
||||
patch -p0 < ../perlmagick.rpath.patch
|
||||
patch -p0 -i "${srcdir}/perlmagick.rpath.patch"
|
||||
|
||||
./configure --prefix=/usr --with-modules --disable-static \
|
||||
--enable-openmp --with-x --with-wmf --with-openexr --with-xml \
|
||||
--with-gslib --with-gs-font-dir=/usr/share/fonts/Type1 \
|
||||
--with-perl --with-perl-options="INSTALLDIRS=vendor" \
|
||||
--without-gvc --without-djvu --without-autotrace --with-jp2 \
|
||||
--without-jbig --without-fpx --without-dps
|
||||
--without-jbig --without-fpx --without-dps --without-fftw
|
||||
make
|
||||
}
|
||||
|
||||
|
@ -1,26 +1,36 @@
|
||||
# $Id: PKGBUILD 79310 2010-05-02 17:40:37Z ibiru $
|
||||
# Maintainer: Jan de Groot <jgc@archlinux.org>
|
||||
# Platform Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer abveritas@chakra-project.org
|
||||
|
||||
pkgname=librsvg
|
||||
pkgver=2.32.1
|
||||
pkgrel=2
|
||||
pkgver=2.36.4
|
||||
pkgrel=1
|
||||
pkgdesc="SAX-based renderer for SVG files into a GdkPixbuf"
|
||||
arch=(i686 x86_64)
|
||||
arch=('x86_64')
|
||||
license=('LGPL')
|
||||
depends=('gdk-pixbuf2' 'pango' 'libcroco')
|
||||
makedepends=('intltool')
|
||||
makedepends=('intltool' 'gobject-introspection')
|
||||
optdepends=('python: rsvg commandline utility')
|
||||
options=('!libtool')
|
||||
url="http://librsvg.sourceforge.net/"
|
||||
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.32/${pkgname}-${pkgver}.tar.bz2)
|
||||
source=("http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.36/${pkgname}-${pkgver}.tar.xz")
|
||||
install=librsvg.install
|
||||
sha256sums=('91b98051f352fab8a6257688d6b2fd665b4648ed66144861f2f853ccf876d334')
|
||||
sha256sums=('1021935204798f4f0ad3004a09b583668ea94a48593461b147fdcff68a18e6c2')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
./configure --prefix=/usr --libexecdir=/usr/lib/${pkgname} \
|
||||
--with-croco --disable-static \
|
||||
--with-svgz --disable-gtk-theme || return 1
|
||||
make || return 1
|
||||
make DESTDIR="${pkgdir}" install || return 1
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--libexecdir=/usr/lib/${pkgname} \
|
||||
--with-croco \
|
||||
--disable-static \
|
||||
--with-svgz \
|
||||
--disable-gtk-theme
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
post_install() {
|
||||
usr/bin/gdk-pixbuf-query-loaders --update-cache
|
||||
gdk-pixbuf-query-loaders --update-cache
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
|
@ -1,29 +1,29 @@
|
||||
#
|
||||
# Platform Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
# maintainer abveritas[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=libwmf
|
||||
pkgver=0.2.8.4
|
||||
pkgrel=10
|
||||
pkgrel=11
|
||||
pkgdesc="A library for reading vector images in Microsoft's native Windows Metafile Format (WMF)."
|
||||
arch=(i686 x86_64)
|
||||
arch=('x86_64')
|
||||
url="http://wvware.sourceforge.net/libwmf.html"
|
||||
license=("LGPL")
|
||||
depends=('libpng>=1.4.0' 'libx11' 'freetype2' 'libjpeg>=8' 'gsfonts' 'expat>=2.0')
|
||||
depends=('libpng>=1.5.0' 'libx11' 'freetype2' 'libjpeg-turbo' 'gsfonts' 'expat>=2.0')
|
||||
makedepends=('pkgconfig')
|
||||
optdepends=('gdk-pixbuf2: for pixbuf loader, used in .install')
|
||||
options=(!libtool)
|
||||
install=libwmf.install
|
||||
source=(http://downloads.sourceforge.net/sourceforge/wvware/${pkgname}-${pkgver}.tar.gz
|
||||
libpng14.patch)
|
||||
source=("http://downloads.sourceforge.net/sourceforge/wvware/${pkgname}-${pkgver}.tar.gz"
|
||||
'libwmf-0.2.8.4-libpng-1.5.patch')
|
||||
md5sums=('d1177739bf1ceb07f57421f0cee191e0'
|
||||
'33d3c07a1be9f99fd88de220930c5550')
|
||||
'21bab2d951aef8e72805eacee950cb09')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${pkgname}-${pkgver}
|
||||
patch -Np1 -i "${srcdir}/libpng14.patch"
|
||||
patch -p1 -i "${srcdir}/libwmf-0.2.8.4-libpng-1.5.patch"
|
||||
|
||||
sed -i -e 's/src include fonts doc/src include fonts/g' Makefile.in
|
||||
./configure --prefix=/usr \
|
||||
--with-gsfontdir=/usr/share/fonts/Type1 \
|
||||
@ -35,6 +35,7 @@ build() {
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
make DESTDIR=${pkgdir} install
|
||||
#Remove fonts, these are in gsfonts
|
||||
rm -rf ${pkgdir}/usr/share/fonts
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -Nur libwmf-0.2.8.4.orig/src/extra/gd/gd_png.c libwmf-0.2.8.4/src/extra/gd/gd_png.c
|
||||
--- libwmf-0.2.8.4.orig/src/extra/gd/gd_png.c 2005-07-27 23:35:06.000000000 +0300
|
||||
+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2010-01-17 01:33:58.000000000 +0200
|
||||
@@ -136,7 +136,7 @@
|
||||
/* first do a quick check that the file really is a PNG image; could
|
||||
* have used slightly more general png_sig_cmp() function instead */
|
||||
gdGetBuf (sig, 8, infile);
|
||||
- if (!png_check_sig (sig, 8))
|
||||
+ if (png_sig_cmp (sig, 0, 8))
|
||||
return NULL; /* bad signature */
|
||||
|
||||
#ifndef PNG_SETJMP_NOT_SUPPORTED
|
12
libwmf/libwmf-0.2.8.4-libpng-1.5.patch
Normal file
12
libwmf/libwmf-0.2.8.4-libpng-1.5.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -urN libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h libwmf-0.2.8.4/src/ipa/ipa/bmp.h
|
||||
--- libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h 2011-05-23 19:14:23.000000000 +0200
|
||||
+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2011-05-23 19:15:11.000000000 +0200
|
||||
@@ -66,7 +66,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (setjmp (png_ptr->jmpbuf))
|
||||
+ if (setjmp(png_jmpbuf(png_ptr)))
|
||||
{ WMF_DEBUG (API,"Failed to write bitmap as PNG! (setjmp failed)");
|
||||
png_destroy_write_struct (&png_ptr,&info_ptr);
|
||||
wmf_free (API,buffer);
|
@ -1,36 +1,34 @@
|
||||
# Platform Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# contributor (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
# maintainer abveritas@chakra-project.org
|
||||
|
||||
pkgname=netpbm
|
||||
pkgver=10.47.24
|
||||
pkgver=10.57.1
|
||||
pkgrel=1
|
||||
pkgdesc="A toolkit for manipulation of graphic images"
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('x86_64')
|
||||
license=('custom' 'BSD' 'GPL' 'LGPL')
|
||||
url="http://netpbm.sourceforge.net/"
|
||||
depends=('perl' 'libjpeg' 'libpng' 'libtiff' 'libxml2')
|
||||
depends=('perl' 'libjpeg-turbo' 'libpng' 'libtiff' 'libxml2')
|
||||
makedepends=('python2')
|
||||
options=('!makeflags')
|
||||
|
||||
source=(ftp://ftp.archlinux.org/other/netpbm/${pkgname}-${pkgver}.tar.gz
|
||||
ftp://ftp.archlinux.org/other/netpbm/netpbm-doc-22Feb2009.tar.xz
|
||||
libpng-1.4.patch netpbm-CAN-2005-2471.patch
|
||||
netpbm-security-code.patch netpbm-security-scripts.patch)
|
||||
md5sums=('debf962e9a5531fd3e57143d38165eac' '48efce0093c5f242bce3072958fe88c3'
|
||||
'6a8319e77f2d41881ee11c86b78c51d0' '07ee863e6f951250e8d0a08243c828c7'
|
||||
'fac4c9bedff9d90ac5a66e93d8c2eb33' 'cbb689129c82d16360d7f840b86789c7')
|
||||
source=(ftp://ftp.archlinux.org/other/netpbm/${pkgname}-${pkgver}.tar.gz \
|
||||
ftp://ftp.archlinux.org/other/netpbm/netpbm-doc-22Feb2009.tar.xz \
|
||||
netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
|
||||
sha1sums=('cd0b99333faf994a680d77c5d217034df35ebd4e'
|
||||
'dfeba9f9a5fe987d64db0aadb5ca8c1b20fcead2'
|
||||
'b79cf9d42488fea065ba16262ed97694c47af08d'
|
||||
'4cd5b94a24886ecae3973c5ae104d8298fe5a1f5'
|
||||
'2ac31f714121e08e47af9337c6bbaab3cbfc5c75')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/stable"
|
||||
patch -p1 < ../libpng-1.4.patch
|
||||
cd "${srcdir}/advanced"
|
||||
patch -p1 < ../netpbm-CAN-2005-2471.patch
|
||||
patch -p1 < ../netpbm-security-code.patch
|
||||
patch -p1 < ../netpbm-security-scripts.patch
|
||||
sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' buildtools/makeman
|
||||
sed -i 's|@python|@python2|' buildtools/manpage.mk
|
||||
|
||||
cp config.mk.in config.mk
|
||||
[ "${CARCH}" = 'x86_64' ] && echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
|
||||
@ -40,42 +38,33 @@ build() {
|
||||
echo 'PNGLIB = libpng.so' >> config.mk
|
||||
echo 'ZLIB = libz.so' >> config.mk
|
||||
|
||||
sed -i 's|PKGMANDIR = man|PKGMANDIR = share/man|' common.mk
|
||||
sed -i 's|misc|share/netpbm|' common.mk
|
||||
sed -i 's|/link|/lib|' lib/Makefile
|
||||
sed -i 's|install.manweb install.man|install.man|' GNUmakefile
|
||||
sed -i '/MANUALS1 = $(BINARIES) $(SCRIPTS)/a\
|
||||
MANUALS1 += bmptoppm faxformat gemtopbm jpegtopnm mrf netpbm pamtotiff pamx pgmedge \\\
|
||||
pgmnorm pgmoil pgmslice pnmarith pnmcut pnmdepth pnmenlarge pnmfile \\\
|
||||
pnminterp pnmnoraw pnmscale pnmsplit pnmtofits pnmtojpeg pnmtopnm pnmtops \\\
|
||||
pnmtotiff pnmtotiffcmyk ppmnorm ppmsvgalib ppmtojpeg ppmtotga ppmtouil \\\
|
||||
tifftopnm vidtoppm \
|
||||
MANUALS3 += libnetpbm_image libnetpbm_ug libpbm libpgm libpm libpnm libppm libsystem libtmpfile \
|
||||
MANUALS5 += extendedopacity pfm' common.mk
|
||||
|
||||
make
|
||||
|
||||
# Generating useful man pages with html doc
|
||||
cd "${srcdir}/doc"
|
||||
make MAKEMAN="${srcdir}/stable/buildtools/makeman" USERGUIDE=. \
|
||||
-f "${srcdir}/stable/buildtools/manpage.mk" manpages
|
||||
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \
|
||||
-f "${srcdir}/advanced/buildtools/manpage.mk" manpages
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/stable"
|
||||
make pkgdir="${pkgdir}/usr" install-run install-dev
|
||||
cd "${srcdir}/advanced"
|
||||
make pkgdir="${pkgdir}/usr" PKGMANDIR=share/man install-run install-dev
|
||||
|
||||
# Removing dummy man pages
|
||||
rm "${pkgdir}"/usr/share/man/man{1,3,5}/*
|
||||
|
||||
cd "${srcdir}/doc"
|
||||
make MAKEMAN="${srcdir}/stable/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
|
||||
-f "${srcdir}/stable/buildtools/manpage.mk" installman
|
||||
make MAKEMAN="${srcdir}/advanced/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
|
||||
-f "${srcdir}/advanced/buildtools/manpage.mk" installman
|
||||
|
||||
# Replace obsolete utility
|
||||
echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${pkgdir}/usr/bin/pgmtopbm"
|
||||
|
||||
# Licensing. Note that each program in the package has a separate license.
|
||||
install -D -m644 "${srcdir}/stable/doc/copyright_summary" \
|
||||
install -D -m644 "${srcdir}/advanced/doc/copyright_summary" \
|
||||
"${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt"
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
--- netpbm-10.29/converter/other/pstopnm.c.CAN-2005-2471 2005-08-15 02:39:46.000000000 +0200
|
||||
+++ netpbm-10.29/converter/other/pstopnm.c 2005-08-16 15:38:15.000000000 +0200
|
||||
@@ -711,11 +711,11 @@
|
||||
"'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'",
|
||||
ghostscriptProg, arg0,
|
||||
deviceopt, outfileopt, gopt, ropt, "-q", "-dNOPAUSE",
|
||||
deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
|
||||
"-q", "-dNOPAUSE",
|
||||
- "-dSAFER", "-");
|
||||
+ "-dPARANOIDSAFER", "-");
|
||||
}
|
||||
|
@ -22,15 +22,15 @@ diff -up netpbm-10.47.04/analyzer/pgmtexture.c.security netpbm-10.47.04/analyzer
|
||||
if (m == NULL)
|
||||
pm_error("Unable to allocate memory for a matrix.");
|
||||
@@ -102,6 +108,9 @@ matrix (int nrl, int nrh, int ncl, int n
|
||||
m -= ncl;
|
||||
assert (nch >= ncl);
|
||||
|
||||
/* allocate rows and set pointers to them */
|
||||
+ if(nch < ncl)
|
||||
+ pm_error("assert: h < l");
|
||||
+ overflow_add(nch - ncl, 1);
|
||||
for (i = nrl; i <= nrh; i++)
|
||||
{
|
||||
for (i = nrl; i <= nrh; ++i) {
|
||||
MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1));
|
||||
if (m[i] == NULL)
|
||||
diff -up netpbm-10.47.04/converter/other/gemtopnm.c.security netpbm-10.47.04/converter/other/gemtopnm.c
|
||||
--- netpbm-10.47.04/converter/other/gemtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/gemtopnm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -118,46 +118,6 @@ diff -up netpbm-10.47.04/converter/other/pnmtojpeg.c.security netpbm-10.47.04/co
|
||||
buffer = (*cinfo_p->mem->alloc_sarray)
|
||||
((j_common_ptr) cinfo_p, JPOOL_IMAGE,
|
||||
(unsigned int) cinfo_p->image_width * cinfo_p->input_components,
|
||||
diff -up netpbm-10.47.04/converter/other/pnmtops.c.security netpbm-10.47.04/converter/other/pnmtops.c
|
||||
--- netpbm-10.47.04/converter/other/pnmtops.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/pnmtops.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -186,16 +186,20 @@ parseCommandLine(int argc, char ** argv,
|
||||
cmdlineP->canturn = !noturn;
|
||||
cmdlineP->showpage = !noshowpage;
|
||||
|
||||
+ overflow2(width, 72);
|
||||
cmdlineP->width = width * 72;
|
||||
+ overflow2(height, 72);
|
||||
cmdlineP->height = height * 72;
|
||||
|
||||
- if (imagewidthSpec)
|
||||
+ if (imagewidthSpec) {
|
||||
+ overflow2(imagewidth, 72);
|
||||
cmdlineP->imagewidth = imagewidth * 72;
|
||||
- else
|
||||
+ } else
|
||||
cmdlineP->imagewidth = 0;
|
||||
- if (imageheightSpec)
|
||||
+ if (imageheightSpec) {
|
||||
+ overflow2(imageheight, 72);
|
||||
cmdlineP->imageheight = imageheight * 72;
|
||||
- else
|
||||
+ } else
|
||||
cmdlineP->imageheight = 0;
|
||||
|
||||
if (!cmdlineP->psfilter &&
|
||||
diff -up netpbm-10.47.04/converter/other/pnmtorle.c.security netpbm-10.47.04/converter/other/pnmtorle.c
|
||||
--- netpbm-10.47.04/converter/other/pnmtorle.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/pnmtorle.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -19,6 +19,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>
|
||||
*/
|
||||
/*
|
||||
* pnmtorle - A program which will convert pbmplus (ppm or pgm) images
|
||||
diff -up netpbm-10.47.04/converter/other/pnmtosgi.c.security netpbm-10.47.04/converter/other/pnmtosgi.c
|
||||
--- netpbm-10.47.04/converter/other/pnmtosgi.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/pnmtosgi.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -216,25 +176,22 @@ diff -up netpbm-10.47.04/converter/other/rletopnm.c.security netpbm-10.47.04/con
|
||||
diff -up netpbm-10.47.04/converter/other/sgitopnm.c.security netpbm-10.47.04/converter/other/sgitopnm.c
|
||||
--- netpbm-10.47.04/converter/other/sgitopnm.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/sgitopnm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -252,13 +252,17 @@ read_channels(ifp, head, table, func, oc
|
||||
|
||||
if (ochan < 0) {
|
||||
maxchannel = (head->zsize < 3) ? head->zsize : 3;
|
||||
@@ -252,10 +252,14 @@ read_channels(ifp, head, table, func, oc
|
||||
MALLOCARRAY_NOFAIL(image, head->ysize);
|
||||
} else {
|
||||
maxchannel = MIN(3, head->zsize);
|
||||
+ overflow2(head->ysize, maxchannel);
|
||||
MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
|
||||
} else {
|
||||
maxchannel = ochan + 1;
|
||||
MALLOCARRAY_NOFAIL(image, head->ysize);
|
||||
}
|
||||
- if ( table )
|
||||
+ if ( table ) {
|
||||
- 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++ ) {
|
||||
#ifdef DEBUG
|
||||
for(channel = 0; channel < maxchannel; ++channel) {
|
||||
unsigned int row;
|
||||
diff -up netpbm-10.47.04/converter/other/sirtopnm.c.security netpbm-10.47.04/converter/other/sirtopnm.c
|
||||
--- netpbm-10.47.04/converter/other/sirtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/sirtopnm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -282,9 +239,9 @@ diff -up netpbm-10.47.04/converter/other/xwdtopnm.c.security netpbm-10.47.04/con
|
||||
*padrightP =
|
||||
h11FixedP->bytes_per_line * 8 -
|
||||
h11FixedP->pixmap_width * h11FixedP->bits_per_pixel;
|
||||
diff -up netpbm-10.47.04/converter/pbm/icontopbm.c.security netpbm-10.47.04/converter/pbm/icontopbm.c
|
||||
--- netpbm-10.47.04/converter/pbm/icontopbm.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/icontopbm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
diff -up netpbm-10.47.04/converter/other/sunicontopnm.c.security netpbm-10.47.04/converter/other/sunicontopnm.c
|
||||
--- netpbm-10.47.04/converter/other/sunicontopnm.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/other/sunicontopnm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
@ -294,17 +251,17 @@ diff -up netpbm-10.47.04/converter/pbm/icontopbm.c.security netpbm-10.47.04/conv
|
||||
#include "nstring.h"
|
||||
#include "pbm.h"
|
||||
@@ -87,6 +88,11 @@ ReadIconFile(FILE * const
|
||||
if ( *heightP <= 0 )
|
||||
pm_error( "invalid height (must be positive): %d", *heightP );
|
||||
if (*heightP <= 0)
|
||||
pm_error("invalid height (must be positive): %d", *heightP);
|
||||
|
||||
+ if ( *widthP > INT_MAX - 16 || *widthP < 0)
|
||||
+ pm_error( "invalid width: %d", *widthP);
|
||||
+
|
||||
+ overflow2(*widthP + 16, *heightP);
|
||||
+
|
||||
data_length = BitmapSize( *widthP, *heightP );
|
||||
*dataP = (short unsigned int *) malloc( data_length );
|
||||
if ( *dataP == NULL )
|
||||
}
|
||||
|
||||
|
||||
diff -up netpbm-10.47.04/converter/pbm/mdatopbm.c.security netpbm-10.47.04/converter/pbm/mdatopbm.c
|
||||
--- netpbm-10.47.04/converter/pbm/mdatopbm.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/mdatopbm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -367,22 +324,6 @@ diff -up netpbm-10.47.04/converter/pbm/pbmto4425.c.security netpbm-10.47.04/conv
|
||||
if(vmap == NULL)
|
||||
{
|
||||
pm_error( "Cannot allocate memory" );
|
||||
diff -up netpbm-10.47.04/converter/pbm/pbmtoascii.c.security netpbm-10.47.04/converter/pbm/pbmtoascii.c
|
||||
--- netpbm-10.47.04/converter/pbm/pbmtoascii.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/pbmtoascii.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -115,9 +115,11 @@ char* argv[];
|
||||
pm_usage( usage );
|
||||
|
||||
pbm_readpbminit( ifp, &cols, &rows, &format );
|
||||
+ overflow_add(cols, gridx);
|
||||
ccols = ( cols + gridx - 1 ) / gridx;
|
||||
bitrow = pbm_allocrow( cols );
|
||||
sig = (int*) pm_allocrow( ccols, sizeof(int) );
|
||||
+ overflow_add(ccols, 1);
|
||||
line = (char*) pm_allocrow( ccols + 1, sizeof(char) );
|
||||
|
||||
for ( row = 0; row < rows; row += gridy )
|
||||
diff -up netpbm-10.47.04/converter/pbm/pbmtocmuwm.c.security netpbm-10.47.04/converter/pbm/pbmtocmuwm.c
|
||||
diff -up netpbm-10.47.04/converter/pbm/pbmtogem.c.security netpbm-10.47.04/converter/pbm/pbmtogem.c
|
||||
--- netpbm-10.47.04/converter/pbm/pbmtogem.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/pbmtogem.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -405,17 +346,6 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtogo.c.security netpbm-10.47.04/conver
|
||||
rucols = ( cols + 7 ) / 8;
|
||||
bytesperrow = rucols; /* GraphOn uses bytes */
|
||||
rucols = rucols * 8;
|
||||
diff -up netpbm-10.47.04/converter/pbm/pbmtoicon.c.security netpbm-10.47.04/converter/pbm/pbmtoicon.c
|
||||
--- netpbm-10.47.04/converter/pbm/pbmtoicon.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/pbmtoicon.c 2009-10-21 15:38:55.000000000 +0200
|
||||
@@ -114,6 +114,7 @@ writeIcon(FILE * const ifP,
|
||||
unsigned char * bitrow;
|
||||
unsigned int row;
|
||||
|
||||
+ overflow_add(cols, 15);
|
||||
bitbuffer = pbm_allocrow_packed(cols + wordintSize);
|
||||
bitrow = &bitbuffer[1];
|
||||
bitbuffer[0] = 0;
|
||||
diff -up netpbm-10.47.04/converter/pbm/pbmtolj.c.security netpbm-10.47.04/converter/pbm/pbmtolj.c
|
||||
--- netpbm-10.47.04/converter/pbm/pbmtolj.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/pbmtolj.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -511,13 +441,13 @@ diff -up netpbm-10.47.04/converter/pbm/pbmtoybm.c.security netpbm-10.47.04/conve
|
||||
--- netpbm-10.47.04/converter/pbm/pbmtoybm.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/pbmtoybm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -45,6 +45,7 @@ main( argc, argv )
|
||||
bitrow = pbm_allocrow( cols );
|
||||
bitrow = pbm_allocrow(cols);
|
||||
|
||||
/* Compute padding to round cols up to the nearest multiple of 16. */
|
||||
+ overflow_add(cols, 16);
|
||||
padright = ( ( cols + 15 ) / 16 ) * 16 - cols;
|
||||
padright = ((cols + 15) / 16) * 16 - cols;
|
||||
|
||||
putinit( cols, rows );
|
||||
putinit(cols, rows);
|
||||
diff -up netpbm-10.47.04/converter/pbm/pbmtozinc.c.security netpbm-10.47.04/converter/pbm/pbmtozinc.c
|
||||
--- netpbm-10.47.04/converter/pbm/pbmtozinc.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/pbmtozinc.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -565,14 +495,14 @@ diff -up netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security netpbm-10.47.04/
|
||||
diff -up netpbm-10.47.04/converter/pbm/ybmtopbm.c.security netpbm-10.47.04/converter/pbm/ybmtopbm.c
|
||||
--- netpbm-10.47.04/converter/pbm/ybmtopbm.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pbm/ybmtopbm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -88,6 +88,7 @@ getinit( file, colsP, rowsP, depthP, pad
|
||||
pm_error( "EOF / read error" );
|
||||
@@ -88,4 +88,5 @@ getinit( file, colsP, rowsP, depthP, pad
|
||||
pm_error("EOF / read error");
|
||||
|
||||
*depthP = 1;
|
||||
+ overflow_add(*colsP, 15);
|
||||
*padrightP = ( ( *colsP + 15 ) / 16 ) * 16 - *colsP;
|
||||
bitsperitem = 0;
|
||||
}
|
||||
*padrightP = ((*colsP + 15) / 16) * 16 - *colsP;
|
||||
}
|
||||
|
||||
diff -up netpbm-10.47.04/converter/pgm/lispmtopgm.c.security netpbm-10.47.04/converter/pgm/lispmtopgm.c
|
||||
--- netpbm-10.47.04/converter/pgm/lispmtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/pgm/lispmtopgm.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -707,7 +637,7 @@ diff -up netpbm-10.47.04/converter/ppm/Makefile.security netpbm-10.47.04/convert
|
||||
leaftoppm mtvtoppm neotoppm \
|
||||
- pcxtoppm pc1toppm pi1toppm picttoppm pjtoppm \
|
||||
+ pcxtoppm pc1toppm pi1toppm pjtoppm \
|
||||
ppmtoacad ppmtoarbtxt \
|
||||
ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \
|
||||
ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \
|
||||
ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \
|
||||
diff -up netpbm-10.47.04/converter/ppm/pcxtoppm.c.security netpbm-10.47.04/converter/ppm/pcxtoppm.c
|
||||
@ -894,14 +824,14 @@ diff -up netpbm-10.47.04/converter/ppm/ppmtopict.c.security netpbm-10.47.04/conv
|
||||
--- netpbm-10.47.04/converter/ppm/ppmtopict.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/ppm/ppmtopict.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@@ -245,6 +245,8 @@ char *argv[];
|
||||
putShort(stdout, 0); /* mode */
|
||||
putShort(stdout, 0); /* mode */
|
||||
|
||||
/* Finally, write out the data. */
|
||||
+ overflow_add(cols/MAX_COUNT, 1);
|
||||
+ overflow_add(cols, cols/MAX_COUNT+1);
|
||||
packed = (char*) malloc((unsigned)(cols+cols/MAX_COUNT+1));
|
||||
oc = 0;
|
||||
for (row = 0; row < rows; row++)
|
||||
/* Finally, write out the data. */
|
||||
+ overflow_add(cols/MAX_COUNT, 1);
|
||||
+ overflow_add(cols, cols/MAX_COUNT+1);
|
||||
packed = malloc((unsigned)(cols+cols/MAX_COUNT+1));
|
||||
for (row = 0, oc = 0; row < rows; row++)
|
||||
oc += putRow(stdout, row, cols, pixels[row], packed);
|
||||
diff -up netpbm-10.47.04/converter/ppm/ppmtopj.c.security netpbm-10.47.04/converter/ppm/ppmtopj.c
|
||||
--- netpbm-10.47.04/converter/ppm/ppmtopj.c.security 2009-10-21 13:39:10.000000000 +0200
|
||||
+++ netpbm-10.47.04/converter/ppm/ppmtopj.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -1106,17 +1036,6 @@ diff -up netpbm-10.47.04/editor/pamcut.c.security netpbm-10.47.04/editor/pamcut.
|
||||
outpam.width = rightcol - leftcol + 1;
|
||||
outpam.height = bottomrow - toprow + 1;
|
||||
|
||||
diff -up netpbm-10.47.04/editor/pbmpscale.c.security netpbm-10.47.04/editor/pbmpscale.c
|
||||
--- netpbm-10.47.04/editor/pbmpscale.c.security 2009-10-21 13:38:57.000000000 +0200
|
||||
+++ netpbm-10.47.04/editor/pbmpscale.c 2009-10-21 15:27:21.000000000 +0200
|
||||
@@ -110,6 +110,7 @@ main(int argc, char ** argv) {
|
||||
inrow[0] = inrow[1] = inrow[2] = NULL;
|
||||
pbm_readpbminit(ifP, &columns, &rows, &format) ;
|
||||
|
||||
+ overflow2(columns, scale);
|
||||
outrow = pbm_allocrow(columns*scale) ;
|
||||
MALLOCARRAY(flags, columns);
|
||||
if (flags == NULL)
|
||||
diff -up netpbm-10.47.04/editor/pbmreduce.c.security netpbm-10.47.04/editor/pbmreduce.c
|
||||
--- netpbm-10.47.04/editor/pbmreduce.c.security 2009-10-21 13:38:57.000000000 +0200
|
||||
+++ netpbm-10.47.04/editor/pbmreduce.c 2009-10-21 15:26:13.000000000 +0200
|
||||
@ -1249,29 +1168,6 @@ diff -up netpbm-10.47.04/editor/pnmshear.c.security netpbm-10.47.04/editor/pnmsh
|
||||
newcols = rows * shearfac + cols + 0.999999;
|
||||
|
||||
pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0);
|
||||
diff -up netpbm-10.47.04/editor/ppmdither.c.security netpbm-10.47.04/editor/ppmdither.c
|
||||
--- netpbm-10.47.04/editor/ppmdither.c.security 2009-10-21 13:38:57.000000000 +0200
|
||||
+++ netpbm-10.47.04/editor/ppmdither.c 2009-10-21 15:09:34.000000000 +0200
|
||||
@@ -111,6 +111,9 @@ dith_matrix(unsigned int const dith_dim)
|
||||
(dith_dim * sizeof(int *)) + /* pointers */
|
||||
(dith_dim * dith_dim * sizeof(int)); /* data */
|
||||
|
||||
+ overflow2(dith_dim, sizeof(int *));
|
||||
+ overflow3(dith_dim, dith_dim, sizeof(int));
|
||||
+ overflow_add(dith_dim * sizeof(int *), dith_dim * dith_dim * sizeof(int));
|
||||
dith_mat = (unsigned int **) malloc(dith_mat_sz);
|
||||
|
||||
if (dith_mat == NULL)
|
||||
@@ -165,7 +168,8 @@ dith_setup(const unsigned int dith_power
|
||||
if (dith_nb < 2)
|
||||
pm_error("too few shades for blue, minimum of 2");
|
||||
|
||||
- MALLOCARRAY(*colormapP, dith_nr * dith_ng * dith_nb);
|
||||
+ overflow2(dith_nr, dith_ng);
|
||||
+ *colormapP = malloc3(dith_nr * dith_ng, dith_nb, sizeof(pixel));
|
||||
if (*colormapP == NULL)
|
||||
pm_error("Unable to allocate space for the color lookup table "
|
||||
"(%d by %d by %d pixels).", dith_nr, dith_ng, dith_nb);
|
||||
diff -up netpbm-10.47.04/editor/specialty/pamoil.c.security netpbm-10.47.04/editor/specialty/pamoil.c
|
||||
--- netpbm-10.47.04/editor/specialty/pamoil.c.security 2009-10-21 13:38:56.000000000 +0200
|
||||
+++ netpbm-10.47.04/editor/specialty/pamoil.c 2009-10-21 15:09:33.000000000 +0200
|
||||
@ -1283,19 +1179,6 @@ diff -up netpbm-10.47.04/editor/specialty/pamoil.c.security netpbm-10.47.04/edit
|
||||
MALLOCARRAY(hist, inpam.maxval + 1);
|
||||
if (hist == NULL)
|
||||
pm_error("Unable to allocate memory for histogram.");
|
||||
diff -up netpbm-10.47.04/generator/pbmpage.c.security netpbm-10.47.04/generator/pbmpage.c
|
||||
--- netpbm-10.47.04/generator/pbmpage.c.security 2009-10-21 13:38:57.000000000 +0200
|
||||
+++ netpbm-10.47.04/generator/pbmpage.c 2009-10-21 15:09:34.000000000 +0200
|
||||
@@ -170,6 +170,9 @@ outputPbm(FILE * const file,
|
||||
/* We round the allocated row space up to a multiple of 8 so the ugly
|
||||
fast code below can work.
|
||||
*/
|
||||
+
|
||||
+ overflow_add(bitmap.Width, 7);
|
||||
+
|
||||
pbmrow = pbm_allocrow(((bitmap.Width+7)/8)*8);
|
||||
|
||||
bitmap_cursor = 0;
|
||||
diff -up netpbm-10.47.04/generator/pbmtext.c.security netpbm-10.47.04/generator/pbmtext.c
|
||||
--- netpbm-10.47.04/generator/pbmtext.c.security 2009-10-21 13:38:57.000000000 +0200
|
||||
+++ netpbm-10.47.04/generator/pbmtext.c 2009-10-21 15:23:15.000000000 +0200
|
||||
@ -1390,16 +1273,6 @@ diff -up netpbm-10.47.04/lib/libpbm1.c.security netpbm-10.47.04/lib/libpbm1.c
|
||||
pm_check(file, check_type, need_raster_size, retval_p);
|
||||
}
|
||||
}
|
||||
diff -up netpbm-10.47.04/lib/libpbmvms.c.security netpbm-10.47.04/lib/libpbmvms.c
|
||||
--- netpbm-10.47.04/lib/libpbmvms.c.security 2009-10-21 13:39:00.000000000 +0200
|
||||
+++ netpbm-10.47.04/lib/libpbmvms.c 2009-10-21 15:09:34.000000000 +0200
|
||||
@@ -1,3 +1,5 @@
|
||||
+#warning "NOT AUDITED"
|
||||
+
|
||||
/***************************************************************************
|
||||
This file contains library routines needed to build Netpbm for VMS.
|
||||
However, as of 2000.05.26, when these were split out of libpbm1.c
|
||||
diff -up netpbm-10.47.04/lib/libpm.c.security netpbm-10.47.04/lib/libpm.c
|
||||
--- netpbm-10.47.04/lib/libpm.c.security 2009-10-21 13:39:00.000000000 +0200
|
||||
+++ netpbm-10.47.04/lib/libpm.c 2009-10-21 15:09:34.000000000 +0200
|
||||
@@ -827,4 +827,53 @@ pm_parse_height(const char * const arg)
|
||||
@ -1482,18 +1355,6 @@ diff -up netpbm-10.47.04/other/pnmcolormap.c.security netpbm-10.47.04/other/pnmc
|
||||
}
|
||||
{
|
||||
unsigned int const intQuotient = colormap.size / pamP->width;
|
||||
diff -up netpbm-10.47.04/urt/README.security netpbm-10.47.04/urt/README
|
||||
--- netpbm-10.47.04/urt/README.security 2009-10-21 13:39:11.000000000 +0200
|
||||
+++ netpbm-10.47.04/urt/README 2009-10-21 15:09:34.000000000 +0200
|
||||
@@ -18,3 +18,8 @@ in its initializer in the original. But
|
||||
defines stdout as a variable, so that wouldn't compile. So I changed
|
||||
it to NULL and added a line to rle_hdr_init to set that field to
|
||||
'stdout' dynamically. 2000.06.02 BJH.
|
||||
+
|
||||
+Redid the code to check for maths overflows and other crawly horrors.
|
||||
+Removed pipe through and compress support (unsafe)
|
||||
+
|
||||
+Alan Cox <alan@redhat.com>
|
||||
diff -up netpbm-10.47.04/urt/rle_addhist.c.security netpbm-10.47.04/urt/rle_addhist.c
|
||||
--- netpbm-10.47.04/urt/rle_addhist.c.security 2009-10-21 13:39:11.000000000 +0200
|
||||
+++ netpbm-10.47.04/urt/rle_addhist.c 2009-10-21 15:09:34.000000000 +0200
|
||||
@ -1630,37 +1491,6 @@ diff -up netpbm-10.47.04/urt/rle_hdr.c.security netpbm-10.47.04/urt/rle_hdr.c
|
||||
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.47.04/urt/rle.h.security netpbm-10.47.04/urt/rle.h
|
||||
--- netpbm-10.47.04/urt/rle.h.security 2009-10-21 13:39:11.000000000 +0200
|
||||
+++ netpbm-10.47.04/urt/rle.h 2009-10-21 15:09:34.000000000 +0200
|
||||
@@ -14,6 +14,9 @@
|
||||
* 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>
|
||||
+ * Header declarations needed
|
||||
*/
|
||||
/*
|
||||
* rle.h - Global declarations for Utah Raster Toolkit RLE programs.
|
||||
@@ -166,6 +169,17 @@ rle_hdr /* End of typedef. *
|
||||
*/
|
||||
extern rle_hdr rle_dflt_hdr;
|
||||
|
||||
+/*
|
||||
+ * Provided by pm library
|
||||
+ */
|
||||
+
|
||||
+extern void overflow_add(int, int);
|
||||
+#define overflow2(a,b) __overflow2(a,b)
|
||||
+extern void __overflow2(int, int);
|
||||
+extern void overflow3(int, int, int);
|
||||
+extern void *malloc2(int, int);
|
||||
+extern void *malloc3(int, int, int);
|
||||
+extern void *realloc2(void *, int, int);
|
||||
|
||||
/* Declare RLE library routines. */
|
||||
|
||||
diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_f.c
|
||||
--- netpbm-10.47.04/urt/rle_open_f.c.security 2009-10-21 13:39:11.000000000 +0200
|
||||
+++ netpbm-10.47.04/urt/rle_open_f.c 2009-10-21 15:15:38.000000000 +0200
|
||||
@ -1704,11 +1534,11 @@ diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_
|
||||
- *noSubprocessP = FALSE;
|
||||
-
|
||||
- if (*mode == 'w')
|
||||
- asprintfN(&command, "compress > %s", file_name);
|
||||
- pm_asprintf(&command, "compress > %s", file_name);
|
||||
- else if (*mode == 'a')
|
||||
- asprintfN(&command, "compress >> %s", file_name);
|
||||
- pm_asprintf(&command, "compress >> %s", file_name);
|
||||
- else
|
||||
- asprintfN(&command, "compress -d < %s", file_name);
|
||||
- pm_asprintf(&command, "compress -d < %s", file_name);
|
||||
-
|
||||
- *fpP = my_popen(command, mode, &thepid);
|
||||
-
|
||||
@ -1720,7 +1550,7 @@ diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_
|
||||
- if (*catchingChildrenP < MAX_CHILDREN)
|
||||
- pids[(*catchingChildrenP)++] = thepid;
|
||||
- }
|
||||
- strfree(command);
|
||||
- pm_strfree(command);
|
||||
- } else {
|
||||
- *noSubprocessP = TRUE;
|
||||
- *errorP = NULL;
|
||||
@ -1815,3 +1645,24 @@ diff -up netpbm-10.47.04/urt/scanargs.c.security netpbm-10.47.04/urt/scanargs.c
|
||||
|
||||
#if defined(c_plusplus) && !defined(USE_PROTOTYPES)
|
||||
#define USE_PROTOTYPES
|
||||
--- advanced/urt/rle_hdr.c.old 2012-01-21 05:57:25.000000000 -0500
|
||||
+++ advanced/urt/rle_hdr.c 2012-01-21 05:57:50.000000000 -0500
|
||||
@@ -29,6 +29,18 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
+/*
|
||||
+ * Provided by pm library
|
||||
+ */
|
||||
+
|
||||
+extern void overflow_add(int, int);
|
||||
+#define overflow2(a,b) __overflow2(a,b)
|
||||
+extern void __overflow2(int, int);
|
||||
+extern void overflow3(int, int, int);
|
||||
+extern void *malloc2(int, int);
|
||||
+/*extern void *malloc3(int, int, int);*/
|
||||
+extern void *realloc2(void *, int, int);
|
||||
+
|
||||
/*****************************************************************
|
||||
* TAG( rle_names )
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user