From 4c444852f5ebbac40cb78b002f34092496b61424 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 7 Feb 2011 23:06:22 +0000 Subject: [PATCH] oops somehow missed this commit - part of adding wbmp support. limit image size macro used. (so no point with a changelog - part of existing). git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56791 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/loaders/wbmp/evas_image_load_wbmp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/loaders/wbmp/evas_image_load_wbmp.c b/src/modules/loaders/wbmp/evas_image_load_wbmp.c index d216391..393d6da 100644 --- a/src/modules/loaders/wbmp/evas_image_load_wbmp.c +++ b/src/modules/loaders/wbmp/evas_image_load_wbmp.c @@ -68,6 +68,13 @@ evas_image_load_file_head_wbmp(Image_Entry *ie, const char *file, const char *ke if (fread(&fixed_header, 1, 1, f) != 1) goto bail; if (read_mb(&w, f) < 0) goto bail; if (read_mb(&h, f) < 0) goto bail; + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto bail; + } + fclose(f); ie->w = w; ie->h = h; -- 2.7.4