$OpenBSD: patch-pbm_pbmclean_c,v 1.1 2003/03/29 04:13:54 brad Exp $
--- pbm/pbmclean.c.orig	Mon Nov 26 13:39:43 2001
+++ pbm/pbmclean.c	Fri Mar 28 20:22:06 2003
@@ -147,7 +147,7 @@ nextrow(FILE * const ifd, int const row,
     inrow[0] = inrow[1];
     inrow[1] = inrow[2];
     inrow[2] = shuffle ;
-    if (row+1 < rows) {
+    if (row <= rows) {
         /* Read the "next" row in from the file.  Allocate buffer if neeeded */
         if (inrow[2] == NULL)
             inrow[2] = pbm_allocrow(cols);
