Commit 5c37bcc3 by heffnercj

Fixed compiler warning in tinfl.c

parent f6eea731
...@@ -625,8 +625,9 @@ int inflate_raw_file(char *in_file, char *out_file) ...@@ -625,8 +625,9 @@ int inflate_raw_file(char *in_file, char *out_file)
if(compressed_data) if(compressed_data)
{ {
memset(compressed_data, 0, in_size); memset(compressed_data, 0, in_size);
fread(compressed_data, 1, in_size, fp_in);
if(fread(compressed_data, 1, in_size, fp_in) == in_size)
{
decompressed_data = (char *) tinfl_decompress_mem_to_heap(compressed_data, in_size, &out_size, 0); decompressed_data = (char *) tinfl_decompress_mem_to_heap(compressed_data, in_size, &out_size, 0);
if(decompressed_data) if(decompressed_data)
...@@ -635,6 +636,7 @@ int inflate_raw_file(char *in_file, char *out_file) ...@@ -635,6 +636,7 @@ int inflate_raw_file(char *in_file, char *out_file)
free(decompressed_data); free(decompressed_data);
retval = out_size; retval = out_size;
} }
}
free(compressed_data); free(compressed_data);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment