mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
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.
This commit is contained in:
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
Block a user