Avoided information leak when processing garbled compressed data
When a compressed file has been deteriorated through hardware error or accidental overwriting, some unrelated data could be leaked. Make sure to zero fill the buffer when this happens.pull/2/head
parent
6bdd1e85ac
commit
1bc996f52f
|
@ -491,6 +491,8 @@ do_next_sb:
|
|||
* first two checks do not detect it.
|
||||
*/
|
||||
if (cb == cb_end || !le16_to_cpup((le16*)cb) || dest == dest_end) {
|
||||
if (dest_end > dest)
|
||||
memset(dest, 0, dest_end - dest);
|
||||
ntfs_log_debug("Completed. Returning success (0).\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue