HomeFreeBSD

Avoid an infinite loop by ensuring that the amount of bytes read is greater

Description

Avoid an infinite loop by ensuring that the amount of bytes read is greater
than 0 in MDXFileChunk when calculating the checksum

This edgecase can be triggered if the file is truncated while the checksum
is being calculated (i.e. the EOF is reached)

Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius)
PR: 196694
Reviewed by: delphij, ngie
Submitted by: Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
ngieAuthored on
Reviewer
delphij
Parents
rS281927: __xlocale_C_ctype should not be const. It contains a reference count that is…
Branches
Unknown
Tags
Unknown