Commit 7c59491c authored by Matthias Clasen's avatar Matthias Clasen

Replace a g_assert_not_reached () which could actually be reached by a

	* io-bmp.c (DecodeHeader): Replace a g_assert_not_reached ()
	which could actually be reached by a proper error status return.
parent ca63d831
2002-03-12 Matthias Clasen <maclas@gmx.de>
* io-bmp.c (DecodeHeader): Replace a g_assert_not_reached ()
which could actually be reached by a proper error status return.
2002-03-05 Matthias Clasen <maclas@gmx.de>
* test-loaders.c, test-images.h: More random tests.
......
......@@ -375,8 +375,14 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
} else if (State->Compressed == BI_BITFIELDS) {
State->read_state = READ_STATE_BITMASKS;
State->BufferSize = 12;
} else
g_assert_not_reached ();
} else {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("BMP image has bogus header data"));
State->read_state = READ_STATE_ERROR;
return FALSE;
}
State->buff = g_realloc (State->buff, State->BufferSize);
......
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