diff options
-rw-r--r-- | doc/HISTORY | 4 | ||||
-rw-r--r-- | lib/util/mallocvar.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index 785871cf..3f26fb43 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -15,6 +15,10 @@ Not yet BJH Release 10.53.00 sunicontopnm: Validate header. Thanks Prophet of the Way <afu@wta.att.ne.jp>. + pm_mallocarray2: fix wild pointers when image is too big to fit + in a single chunk of malloc memory. Affects many Netpbm + programs. Introduced in 10.51.00. + ilbmtoppm: Don't crash on image that has a transparent color index, but no color map. diff --git a/lib/util/mallocvar.c b/lib/util/mallocvar.c index 554030ad..05e2d4c4 100644 --- a/lib/util/mallocvar.c +++ b/lib/util/mallocvar.c @@ -134,7 +134,7 @@ pm_mallocarray2(void ** const resultP, */ rowIndex[rows+1] = NULL; /* Declare it fragmented format */ - allocarrayNoHeap(rowIndex, cols, rows, elementSize, &failed); + allocarrayNoHeap(rowIndex, rows, cols, elementSize, &failed); } rowIndex[rows+0] = NULL; /* mark end of rows */ } |