From 0a9ef97a57346ecc51275cdf2611fa8b506a8ed7 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 12 Dec 2017 10:35:02 +0100 Subject: [PATCH] Fixed uninitialized variable. --- winpr/libwinpr/utils/image.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/winpr/libwinpr/utils/image.c b/winpr/libwinpr/utils/image.c index 7c9a1f1ba..d98243c67 100644 --- a/winpr/libwinpr/utils/image.c +++ b/winpr/libwinpr/utils/image.c @@ -241,6 +241,12 @@ static int winpr_image_bitmap_read_fp(wImage* image, FILE* fp) wStream* s; WINPR_BITMAP_FILE_HEADER bf; WINPR_BITMAP_INFO_HEADER bi; + + if (!image || !fp) + return -1; + + image->data = NULL; + s = Stream_New(NULL, sizeof(WINPR_BITMAP_FILE_HEADER) + sizeof(WINPR_BITMAP_INFO_HEADER)); if (!s)