From 09a1afbb3ddb6afa6d2db69276739f0509547ad5 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 8 Jan 2016 18:59:36 -0600 Subject: [PATCH] [libpng17] Fixed another Coverity defect, NULL dereference "ps" in pngwutil.c --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngwutil.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 47ac1f436..e1688fad2 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta77 - January 7, 2016 +Libpng 1.7.0beta77 - January 9, 2016 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -1172,7 +1172,8 @@ Version 1.7.0beta76 [January 7, 2016] Fixed new Coverity defect, potential NULL dereference of "ps" in pngwutil.c Added temporary workaround for Coverity "Dead code" defect. -Version 1.7.0beta77 [January 7, 2016] +Version 1.7.0beta77 [January 9, 2016] + Fixed new Coverity defect, another NULL dereference of "ps" in pngwutil.c Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 76bb92be0..63fb0b81e 100644 --- a/CHANGES +++ b/CHANGES @@ -5471,7 +5471,8 @@ Version 1.7.0beta76 [January 7, 2016] Fixed new Coverity defect, potential NULL dereference of "ps" in pngwutil.c Added temporary workaround for Coverity "Dead code" defect. -Version 1.7.0beta77 [January 7, 2016] +Version 1.7.0beta77 [January 9, 2016] + Fixed new Coverity defect, another NULL dereference of "ps" in pngwutil.c Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngwutil.c b/pngwutil.c index 419091283..664ed8642 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -2272,7 +2272,7 @@ png_start_IDAT(png_structrp png_ptr) } # endif /* WRITE_FILTER */ - if (ps->zlib_strategy == (-1)/*unset*/) + if (ps && ps->zlib_strategy == (-1)/*unset*/) { # ifdef PNG_WRITE_FILTER_SUPPORTED if (ps->filter_mask != PNG_FILTER_NONE)