about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY3
-rw-r--r--lib/libpm.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index ce424a6b..d8b62dcf 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -44,6 +44,9 @@ not yet  BJH  Release 10.40.00
 
               libnetpbm: pbm_readppminit: read PBM as maxval of 255, not 1.
 
+              libnetpbm: Fix pm_drain() to use the specified limit.
+              Thanks Paul Bolle <pebolle@tiscali.nl>.
+
               libnetpbm: Fix multi-line TUPLTYPE interpretation:
               separate lines with blank, not newline.  Thanks Paul
               Bolle <pebolle@tiscali.nl>.
diff --git a/lib/libpm.c b/lib/libpm.c
index 115d301c..1c31ce84 100644
--- a/lib/libpm.c
+++ b/lib/libpm.c
@@ -1681,7 +1681,7 @@ pm_drain(FILE *         const fileP,
     unsigned int bytesRead;
     bool eof;
 
-    for (bytesRead = 0, eof = false; !eof && bytesRead < 4096;) {
+    for (bytesRead = 0, eof = false; !eof && bytesRead < limit;) {
 
         int rc;