From 580f4f55615e43ef44df5dc34ed8a3a043b6a078 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 18 May 2009 10:40:33 -0500 Subject: [PATCH] Revert "Set png_ptr->old_prev_row_size=0 in pngpread.c and pngrutil.c" This should be handled in the APNG fork instead of in libpng proper. This reverts commit ee59a9f9f01ecc319ba33b561662b29a4af2abad. --- pngpread.c | 6 ++---- pngrutil.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pngpread.c b/pngpread.c index 1cb036db7..c12743515 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1110,12 +1110,11 @@ png_read_push_finish_row(png_structp png_ptr) if (png_ptr->row_number < png_ptr->num_rows) return; - png_ptr->old_prev_row_size = 0; /* Force prev_row to be cleared */ - -#if defined(PNG_READ_INTERLACING_SUPPORTED) if (png_ptr->interlaced) { png_ptr->row_number = 0; + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + do { png_ptr->pass++; @@ -1148,7 +1147,6 @@ png_read_push_finish_row(png_structp png_ptr) } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0); } -#endif /* PNG_READ_INTERLACING_SUPPORTED */ } #if defined(PNG_READ_tEXt_SUPPORTED) diff --git a/pngrutil.c b/pngrutil.c index bbc6a91f4..d039e1161 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -2992,12 +2992,11 @@ png_read_finish_row(png_structp png_ptr) if (png_ptr->row_number < png_ptr->num_rows) return; - png_ptr->old_prev_row_size = 0; /* Force prev_row to be cleared */ - #ifdef PNG_READ_INTERLACING_SUPPORTED if (png_ptr->interlaced) { png_ptr->row_number = 0; + png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); do { png_ptr->pass++;