forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
ca63d83169
commit
7c59491ce4
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2002-03-05 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* test-loaders.c, test-images.h: More random tests.
|
* 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) {
|
} else if (State->Compressed == BI_BITFIELDS) {
|
||||||
State->read_state = READ_STATE_BITMASKS;
|
State->read_state = READ_STATE_BITMASKS;
|
||||||
State->BufferSize = 12;
|
State->BufferSize = 12;
|
||||||
} else
|
} else {
|
||||||
g_assert_not_reached ();
|
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);
|
State->buff = g_realloc (State->buff, State->BufferSize);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user