diff --git a/ChangeLog b/ChangeLog index 3cd3234b..7ac84db3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 30/4/21 start 8.10.7 - better vips7 PNG load compatibility [SkyDiverCool] +- fix load of large PPM images from a pipe [ewelot] 22/12/20 start 8.10.6 - don't seek on bad file descriptors [kleisauke] diff --git a/libvips/foreign/ppmload.c b/libvips/foreign/ppmload.c index 7f16cb65..083b2a56 100644 --- a/libvips/foreign/ppmload.c +++ b/libvips/foreign/ppmload.c @@ -506,8 +506,8 @@ vips_foreign_load_ppm_generate_binary( VipsRegion *or, while( n_bytes > 0 ) { gint64 bytes_read; - bytes_read = vips_source_read( ppm->source, - q, sizeof_line ); + bytes_read = + vips_source_read( ppm->source, q, n_bytes ); if( bytes_read < 0 ) return( -1 ); if( bytes_read == 0 ) { @@ -516,8 +516,8 @@ vips_foreign_load_ppm_generate_binary( VipsRegion *or, return( -1 ); } - n_bytes -= bytes_read; q += bytes_read; + n_bytes -= bytes_read; } }