From 4e9dae37767462c531f489fab13980f210b32da6 Mon Sep 17 00:00:00 2001 From: Evan Tang Date: Mon, 27 Jan 2020 02:13:41 -0600 Subject: [PATCH] kernel32/lzexpand: Fix uninitialized read in read_header. read_header calls _lread which can either return the number of characters read or HFILE_ERROR (-1), cast to a UINT. Signed-off-by: Evan Tang Signed-off-by: Alexandre Julliard --- dlls/kernel32/lzexpand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/lzexpand.c b/dlls/kernel32/lzexpand.c index 4b2ec2ed456..73c9ddc031b 100644 --- a/dlls/kernel32/lzexpand.c +++ b/dlls/kernel32/lzexpand.c @@ -139,7 +139,7 @@ static INT read_header(HFILE fd,struct lzfileheader *head) /* We can't directly read the lzfileheader struct due to * structure element alignment */ - if (_lread(fd,buf,LZ_HEADER_LEN)magic,buf,LZ_MAGIC_LEN); memcpy(&(head->compressiontype),buf+LZ_MAGIC_LEN,1);