Commit 29c0d6fa authored by Matthias Clasen's avatar Matthias Clasen
Browse files

io-png.c (png_row_callback): Check that row_num is valid.

parent 97d99169
Thu Aug 30 08:27:37 2001 Matthias Clasen <matthiasc@poet.de>
* io-png.c (png_row_callback): Check that row_num is valid.
Tue Aug 28 21:05:26 2001 Matthias Clasen <matthiasc@poet.de>
* io-bmp.c (OneLine): Emit area_updated signal with proper
......
......@@ -563,6 +563,17 @@ png_row_callback (png_structp png_read_ptr,
if (lc->fatal_error_occurred)
return;
if (row_num < 0 || row_num >= lc->pixbuf->height) {
lc->fatal_error_occurred = TRUE;
if (lc->error && *lc->error == NULL) {
g_set_error (lc->error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Fatal error reading PNG image file"));
}
return;
}
if (lc->first_row_seen_in_chunk < 0) {
lc->first_row_seen_in_chunk = row_num;
lc->first_pass_seen_in_chunk = pass_num;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment