diff options
-rw-r--r-- | converter/other/cameratopam/camera.c | 8 | ||||
-rw-r--r-- | doc/HISTORY | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/converter/other/cameratopam/camera.c b/converter/other/cameratopam/camera.c index 14d208e3..d318e379 100644 --- a/converter/other/cameratopam/camera.c +++ b/converter/other/cameratopam/camera.c @@ -15,6 +15,7 @@ #include "pm_config.h" #include "pm.h" #include "mallocvar.h" +#include "pm_c_util.h" #include "global_variables.h" #include "cameratopam.h" @@ -699,11 +700,12 @@ kodak_radc_load_raw(Image const image) { init_decoder(); getbits(ifp, -1); - for (i = 0; i < 3; ++i) { + for (i = 0; i < ARRAY_SIZE(buf); ++i) { unsigned int j; - for (j = 0; j < 3; ++j) { + for (j = 0; j < ARRAY_SIZE(buf[0]); ++j) { unsigned int k; - buf[i][j][k] = 2048; + for (k = 0; k < ARRAY_SIZE(buf[0][0]); ++k) + buf[i][j][k] = 2048; } } for (row=0; row < height; row+=4) { diff --git a/doc/HISTORY b/doc/HISTORY index 3256d5fb..818b6ac4 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -22,6 +22,9 @@ not yet BJH Release 10.70.00 nearly always. Always broken (These options were new in Netpbm 10.32 (February 2006)). + cameratopam: fix bug: variable used before set; unknown impact. + Introduced in Netpbm 10.66 (March 2014). + On Windows, don't leave temporary files around (previous code did so because unlink of an open file fails in Windows; new code deletes temporary files via atexit). Thanks |