GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 485b4f52 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Check for overflow in one more place. (#313818, Tommi Komulainen)

2005-08-18  Matthias Clasen  <mclasen@redhat.com>

	* io-ico.c (DecodeHeader): Check for overflow in one more
	place.  (#313818, Tommi Komulainen)
parent 86685d2a
2005-08-18 Matthias Clasen <mclasen@redhat.com>
* io-ico.c (DecodeHeader): Check for overflow in one more
place. (#313818, Tommi Komulainen)
2005-08-15 Matthias Clasen <mclasen@redhat.com>
* io-jpeg.c (fatal_error_handler): Pay attention to the
......
......@@ -261,7 +261,15 @@ static void DecodeHeader(guchar *Data, gint Bytes,
so we know how many bytes are in the "header" part. */
State->HeaderSize = State->DIBoffset + 40; /* 40 = sizeof(InfoHeader) */
if (State->HeaderSize < 0) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Invalid header in icon"));
return;
}
if (State->HeaderSize>State->BytesInHeaderBuf) {
guchar *tmp=g_try_realloc(State->HeaderBuf,State->HeaderSize);
if (!tmp) {
......
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