mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] In pngtest, treat benign errors as errors if "-strict" is present.
This commit is contained in:
11
pngtest.c
11
pngtest.c
@@ -745,6 +745,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (strict)
|
||||
{
|
||||
/* Treat png_benign_error() as errors on read */
|
||||
png_set_benign_errors(read_ptr, 0);
|
||||
|
||||
/* Treat them as errors on write */
|
||||
png_set_benign_errors(write_ptr, 0);
|
||||
|
||||
/* if strict is not set, then both are treated as warnings. */
|
||||
}
|
||||
|
||||
pngtest_debug("Initializing input and output streams");
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
png_init_io(read_ptr, fpin);
|
||||
|
||||
Reference in New Issue
Block a user