提交 4ac8b5e0 编写于 作者: G Glenn Randers-Pehrson

[libpng16] Use png_debug2() instead of printf() for bug reporting.

上级 9d4215e6
/* pngpread.c - read a png file in push mode /* pngpread.c - read a png file in push mode
* *
* Last changed in libpng 1.6.24 [August 4, 2016] * Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
...@@ -253,7 +253,7 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr) ...@@ -253,7 +253,7 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
} }
if (png_ptr->push_length > limit) if (png_ptr->push_length > limit)
{ {
printf(" png_ptr->push_length = %lu, limit = %lu\n", png_debug2(1," png_ptr->push_length = %lu, limit = %lu",
(unsigned long)png_ptr->push_length,(unsigned long)limit); (unsigned long)png_ptr->push_length,(unsigned long)limit);
png_chunk_error(png_ptr, "chunk data is too large"); png_chunk_error(png_ptr, "chunk data is too large");
} }
......
...@@ -213,8 +213,8 @@ png_read_chunk_header(png_structrp png_ptr) ...@@ -213,8 +213,8 @@ png_read_chunk_header(png_structrp png_ptr)
if (length > limit) if (length > limit)
{ {
printf(" length = %lu, limit = %lu\n", png_debug2(1," png_ptr->push_length = %lu, limit = %lu",
(unsigned long)length,(unsigned long)limit); (unsigned long)png_ptr->push_length,(unsigned long)limit);
png_chunk_error(png_ptr, "chunk data is too large"); png_chunk_error(png_ptr, "chunk data is too large");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册