summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2005-10-08 10:19:07 +0200
committerStefan Roese <sr@denx.de>2005-10-08 10:19:07 +0200
commitc29ab9d71d229ee94e8263845ea54222005e3880 (patch)
tree60bf999c52c3e7bce7320d4ac82a7a0d27c3096c /drivers
parentbccae9039e59ac09a776429119389a6a4e679fd7 (diff)
downloadu-boot-imx-c29ab9d71d229ee94e8263845ea54222005e3880.zip
u-boot-imx-c29ab9d71d229ee94e8263845ea54222005e3880.tar.gz
u-boot-imx-c29ab9d71d229ee94e8263845ea54222005e3880.tar.bz2
Fix gzip bmp support (test if malloc fails, warning when truncated).
Increase CFG_VIDEO_LOGO_MAX_SIZE on HH405 board. Patch by Stefan Roese, 08 Oct 2005
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cfb_console.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/cfb_console.c b/drivers/cfb_console.c
index aba4a03..82b35e5 100644
--- a/drivers/cfb_console.c
+++ b/drivers/cfb_console.c
@@ -779,11 +779,18 @@ int video_display_bitmap (ulong bmp_image, int x, int y)
*/
len = CFG_VIDEO_LOGO_MAX_SIZE;
dst = malloc(CFG_VIDEO_LOGO_MAX_SIZE);
+ if (dst == NULL) {
+ printf("Error: malloc in gunzip failed!\n");
+ return(1);
+ }
if (gunzip(dst, CFG_VIDEO_LOGO_MAX_SIZE, (uchar *)bmp_image, &len) != 0) {
printf ("Error: no valid bmp or bmp.gz image at %lx\n", bmp_image);
free(dst);
return 1;
}
+ if (len == CFG_VIDEO_LOGO_MAX_SIZE) {
+ printf("Image could be truncated (increase CFG_VIDEO_LOGO_MAX_SIZE)!\n");
+ }
/*
* Set addr to decompressed image