From bf85274a5c089c1c6295f0caf54ecf0c1c42e887 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 29 Sep 2023 17:52:10 +0000 Subject: Validate computable image size and maxval in libnetpbm write init functions git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4706 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/libpgm1.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/libpgm1.c') diff --git a/lib/libpgm1.c b/lib/libpgm1.c index 6feb1c8b..8fa5baf9 100644 --- a/lib/libpgm1.c +++ b/lib/libpgm1.c @@ -90,9 +90,9 @@ pgm_readpgminitrest(FILE * const fileP, -static void -validateComputableSize(unsigned int const cols, - unsigned int const rows) { +void +pgm_validateComputableSize(unsigned int const cols, + unsigned int const rows) { /*---------------------------------------------------------------------------- Validate that the dimensions of the image are such that it can be processed in typical ways on this machine without worrying about @@ -115,8 +115,8 @@ validateComputableSize(unsigned int const cols, -static void -validateComputableMaxval(gray const maxval) { +void +pgm_validateComputableMaxval(gray const maxval) { /*---------------------------------------------------------------------------- This is similar to validateComputableSize, but for the maxval. -----------------------------------------------------------------------------*/ @@ -193,9 +193,9 @@ pgm_readpgminit(FILE * const fileP, pm_error("bad magic number 0x%x - not a PPM, PGM, PBM, or PAM file", realFormat); } - validateComputableSize(*colsP, *rowsP); + pgm_validateComputableSize(*colsP, *rowsP); - validateComputableMaxval(*maxvalP); + pgm_validateComputableMaxval(*maxvalP); } -- cgit 1.4.1