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 <etang110@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
47f3abb633
commit
4e9dae3776
|
@ -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)<LZ_HEADER_LEN)
|
||||
if (_lread(fd,buf,LZ_HEADER_LEN) != LZ_HEADER_LEN)
|
||||
return 0;
|
||||
memcpy(head->magic,buf,LZ_MAGIC_LEN);
|
||||
memcpy(&(head->compressiontype),buf+LZ_MAGIC_LEN,1);
|
||||
|
|
Loading…
Reference in New Issue