- fix segfault in ximtoppm (#482891), the utility lacked the command line

parsing initialization code
This commit is contained in:
Jindrich Novy 2009-01-28 18:25:26 +00:00
parent 1e0e8dec03
commit 24b3587d41
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -up netpbm-10.35.58/converter/ppm/ximtoppm.c.ximtoppmsegfault netpbm-10.35.58/converter/ppm/ximtoppm.c
--- netpbm-10.35.58/converter/ppm/ximtoppm.c.ximtoppmsegfault 2009-01-28 18:37:05.000000000 +0100
+++ netpbm-10.35.58/converter/ppm/ximtoppm.c 2009-01-28 19:01:14.000000000 +0100
@@ -50,6 +50,10 @@ parseCommandLine(int argc, char ** argv,
OPTENT3(0, "alphaout", OPT_STRING,
&cmdlineP->alpha_filename, &alphaoutSpec, 0);
+ opt.opt_table = option_def;
+ opt.short_allowed = FALSE;
+ opt.allowNegNum = FALSE;
+
optParseOptions3(&argc, argv, opt, sizeof(opt), 0);
/* Uses and sets argc, argv, and all of *cmdlineP. */

View File

@ -1,7 +1,7 @@
Summary: A library for handling different graphics file formats
Name: netpbm
Version: 10.35.58
Release: 3%{?dist}
Release: 4%{?dist}
# See copyright_summary for details
License: BSD and GPLv2 and IJG and MIT and Public Domain
Group: System Environment/Libraries
@ -34,6 +34,7 @@ Patch21: netpbm-10.35-pamtosvgsegfault.patch
Patch22: netpbm-10.35-pnmmontagefix.patch
Patch23: netpbm-10.35-pnmtofiasco-stdin.patch
Patch24: netpbm-10.35-64bitfix.patch
Patch25: netpbm-10.35-ximtoppmsegfault.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
BuildRequires: libX11-devel, python, jasper-devel
@ -98,6 +99,7 @@ netpbm-progs. You'll also need to install the netpbm package.
%patch22 -p1 -b .pnmmontagefix
%patch23 -p1 -b .pnmtofiasco-stdin
%patch24 -p1 -b .64bitfix
%patch25 -p1 -b .ximtoppmsegfault
##mv shhopt/shhopt.h shhopt/pbmshhopt.h
##perl -pi -e 's|shhopt.h|pbmshhopt.h|g' `find -name "*.c" -o -name "*.h"` ./GNUmakefile
@ -225,6 +227,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/netpbm/
%changelog
* Wed Jan 28 2009 Jindrich Novy <jnovy@redhat.com> 10.35.58-4
- fix segfault in ximtoppm (#482891), the utility lacked the
command line parsing initialization code
* Thu Jan 22 2009 Jindrich Novy <jnovy@redhat.com> 10.35.58-3
- fix cmuwmtopbm and other utilities by making endianess
functions work correctly on 64bit systems (#476863)