btrfs-progs: don't overflow colors[] in fragments
authorZach Brown <zab@redhat.com>
Mon, 7 Oct 2013 21:43:03 +0000 (14:43 -0700)
committerChris Mason <chris.mason@fusionio.com>
Wed, 16 Oct 2013 12:23:13 +0000 (08:23 -0400)
commit29340e68532ede8fef3b0d84c8d4ae0f1b000d26
tree2be898b543b76cdc7aeefe983161b552c7384fd0
parente2da6395959c454d1e98ff03b259ddc7e96b5861
btrfs-progs: don't overflow colors[] in fragments

Stop iteration at the number of elements in the colors[] array when
initializing the elements.  Rather than a magic number.  This was found
by static analysis.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
btrfs-fragments.c