From b5b6c2d5e1cdd9db1f360ea057b822e7bdb948ee Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 24 Aug 2023 21:15:34 +0000 Subject: Assert no arithmetic overflow problem git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4611 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/pgmtexture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/analyzer/pgmtexture.c b/analyzer/pgmtexture.c index 0eadea83..8a1678e2 100644 --- a/analyzer/pgmtexture.c +++ b/analyzer/pgmtexture.c @@ -97,7 +97,7 @@ vector(unsigned int const nl, float * v; unsigned int i; - assert(nh >= nl); + assert(nh >= nl); assert(nh <= UINT_MAX-1); MALLOCARRAY(v, (unsigned) (nh - nl + 1)); @@ -133,7 +133,7 @@ matrix (unsigned int const nrl, unsigned int i; float ** matrix; /* What we are creating */ - assert(nrh >= nrl); + assert(nrh >= nrl); assert(nrh <= UINT_MAX-1); /* allocate pointers to rows */ MALLOCARRAY(matrix, (unsigned) (nrh - nrl + 1)); @@ -142,7 +142,7 @@ matrix (unsigned int const nrl, matrix -= ncl; - assert (nch >= ncl); + assert (nch >= ncl); assert(nch <= UINT_MAX-1); /* allocate rows and set pointers to them */ for (i = nrl; i <= nrh; ++i) { -- cgit 1.4.1