diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-05-30 21:21:05 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-05-30 21:21:05 +0000 |
commit | 3844e783dcdc29ffe48740e4507f2d00703b0909 (patch) | |
tree | 5d747d7e9d733a9b93ef32491745c791f8bca437 | |
parent | 28f39a65360c20f04fc16873a8adb599d6cfae57 (diff) | |
download | netpbm-mirror-3844e783dcdc29ffe48740e4507f2d00703b0909.tar.gz netpbm-mirror-3844e783dcdc29ffe48740e4507f2d00703b0909.tar.xz netpbm-mirror-3844e783dcdc29ffe48740e4507f2d00703b0909.zip |
Fix bogus assertion
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1228 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | doc/HISTORY | 4 | ||||
-rw-r--r-- | lib/libppmd.c | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index ab2af09e..351bd19f 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -28,7 +28,7 @@ not yet BJH Release 10.51.00 libnetpbm, various PBM programs: Use SSE insted of MMX. Thanks Prophet of the Way <afu@wta.att.ne.jp>. - pamarith: fix memory leak. + pamarith: fix memory leak. Introduced in 10.41. pnm_bytespersample(): fix bogus assertion on 64 bit system. @@ -56,6 +56,8 @@ not yet BJH Release 10.51.00 pampaintspill: fix incorrect output. + libppmd: fix bogus assertion, introduced in 10.47. + build: fix incorrect determination of when vasprintf() exists in libc. diff --git a/lib/libppmd.c b/lib/libppmd.c index deb47c0f..c7e7ad57 100644 --- a/lib/libppmd.c +++ b/lib/libppmd.c @@ -437,9 +437,12 @@ clipEnd1(ppmd_point const p0, at 0. -----------------------------------------------------------------------------*/ ppmd_point c1; - - assert(p1.x >= 0 && p0.y < cols); - assert(p1.y >= 0 && p0.y < rows); + /* The current clipped location of p1; we clip it multile times + to get the final location. + */ + /* p0 is in the frame: */ + assert(p0.x >= 0 && p0.x < cols); + assert(p0.y >= 0 && p0.y < rows); /* Clip End 1 of the line horizontally */ c1 = p1; /* initial value */ |