From bfa0ea3cff9f2938c5eaa4f9be2730a6874e5a35 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 5 Apr 2010 15:31:03 +0000 Subject: Fix signedness problem git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1176 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/avstopam.c | 10 +++++----- doc/HISTORY | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/converter/other/avstopam.c b/converter/other/avstopam.c index 8d32008c..322f387d 100644 --- a/converter/other/avstopam.c +++ b/converter/other/avstopam.c @@ -43,11 +43,11 @@ producePam(FILE * const avsFileP, unsigned int col; for (col = 0; col < pamP->width; ++col) { tuple const thisTuple = tuplerow[col]; - char c; - pm_readchar(avsFileP, &c); thisTuple[3] = c; - pm_readchar(avsFileP, &c); thisTuple[0] = c; - pm_readchar(avsFileP, &c); thisTuple[1] = c; - pm_readchar(avsFileP, &c); thisTuple[2] = c; + unsigned char c; + pm_readcharu(avsFileP, &c); thisTuple[3] = c; + pm_readcharu(avsFileP, &c); thisTuple[0] = c; + pm_readcharu(avsFileP, &c); thisTuple[1] = c; + pm_readcharu(avsFileP, &c); thisTuple[2] = c; } pnm_writepamrow(pamP, tuplerow); } diff --git a/doc/HISTORY b/doc/HISTORY index 0b7d51b6..c3e60fd9 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -16,6 +16,8 @@ not yet BJH Release 10.51.00 large as to bust the system's program parameter size limit on the invocation of pnmconvol. + avstopam: fix incorrect output. + pnmsmooth: fix arithmetic overflow with absurdly large convolution matrix dimensions. Thanks Prophet of the Way . -- cgit 1.4.1