mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Changed chunk handler warnings into benign errors, incrementally
load iCCP
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
51624965e2
commit
b11b31aea2
@@ -3099,7 +3099,7 @@ read_one_file(Image *image)
|
||||
{
|
||||
long int cb = ftell(f);
|
||||
|
||||
if (cb >= 0 && (unsigned long int)cb < (size_t)~(size_t)0)
|
||||
if (cb > 0 && (unsigned long int)cb < (size_t)~(size_t)0)
|
||||
{
|
||||
png_bytep b = voidcast(png_bytep, malloc((size_t)cb));
|
||||
|
||||
@@ -3118,17 +3118,22 @@ read_one_file(Image *image)
|
||||
{
|
||||
free(b);
|
||||
return logclose(image, f, image->file_name,
|
||||
": read failed");
|
||||
": read failed: ");
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
return logclose(image, f, image->file_name,
|
||||
": out of memory");
|
||||
": out of memory: ");
|
||||
}
|
||||
|
||||
else if (cb == 0)
|
||||
return logclose(image, f, image->file_name,
|
||||
": zero length: ");
|
||||
|
||||
else
|
||||
return logclose(image, f, image->file_name, ": tell failed");
|
||||
return logclose(image, f, image->file_name,
|
||||
": tell failed: ");
|
||||
}
|
||||
|
||||
else
|
||||
@@ -3169,7 +3174,7 @@ write_one_file(Image *output, Image *image, int convert_to_8bit)
|
||||
}
|
||||
|
||||
else
|
||||
return logclose(image, f, "tmpfile", ": flush");
|
||||
return logclose(image, f, "tmpfile", ": flush: ");
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user