]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r281928:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 18 May 2015 10:45:18 +0000 (10:45 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 18 May 2015 10:45:18 +0000 (10:45 +0000)
commitcda15f676ae6ae38332ec5e45975f513da6611c8
treed8875118841419463ad418f56ec645695a9594e4
parentfeaa066cebd5baa229437b5291c7cda227466b79
MFC r281928:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@283054 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libmd/mdXhl.c