about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY4
-rw-r--r--lib/libppmd.c9
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 */