btrfs-progs: image: catch zero length extents, avoid endless loop
authorDavid Sterba <dsterba@suse.com>
Mon, 3 Oct 2016 12:52:30 +0000 (14:52 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Oct 2016 13:07:24 +0000 (15:07 +0200)
commit3956c16d0b1ba2e35b32530de80f68f29c8a8ae8
tree6853810cc91f449f5e6b6f53d6bfbd2aec89b877
parent35d0588b641b227f6560f8c7240e0b2c43afae14
btrfs-progs: image: catch zero length extents, avoid endless loop

If an extent is found to have length 0, we'd loop endlessly in
copy_from_extent_tree. Reproduced by fuzzed image
bko-166361-blocksize-zero.raw within test 002-simple-image .

Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-image.c