diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-29 17:52:10 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-29 17:52:10 +0000 |
commit | bf85274a5c089c1c6295f0caf54ecf0c1c42e887 (patch) | |
tree | 54564e27e71bb7e6f85a6bf121d47df731c04f99 /lib/libpgm1.c | |
parent | c8ea970312eb3e9877d876e5b4d5575237187197 (diff) | |
download | netpbm-mirror-bf85274a5c089c1c6295f0caf54ecf0c1c42e887.tar.gz netpbm-mirror-bf85274a5c089c1c6295f0caf54ecf0c1c42e887.tar.xz netpbm-mirror-bf85274a5c089c1c6295f0caf54ecf0c1c42e887.zip |
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
Diffstat (limited to 'lib/libpgm1.c')
-rw-r--r-- | lib/libpgm1.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); } |