diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-24 21:15:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-24 21:15:34 +0000 |
commit | b5b6c2d5e1cdd9db1f360ea057b822e7bdb948ee (patch) | |
tree | a71fb9f2838c4de51d267e2d50686061a7750895 | |
parent | 99d7a87caba98d487632c8e4430d80822ebccd43 (diff) | |
download | netpbm-mirror-b5b6c2d5e1cdd9db1f360ea057b822e7bdb948ee.tar.gz netpbm-mirror-b5b6c2d5e1cdd9db1f360ea057b822e7bdb948ee.tar.xz netpbm-mirror-b5b6c2d5e1cdd9db1f360ea057b822e7bdb948ee.zip |
Assert no arithmetic overflow problem
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4611 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | analyzer/pgmtexture.c | 6 |
1 files 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) { |