* grub-core/fs/affs.c (grub_affs_read_block): Avoid <= in loop

condition to avoid possibly infinite loops.
	* grub-core/lib/pbkdf2.c (grub_crypto_pbkdf2): Likewise.
	* grub-core/lib/xzembed/xz_dec_bcj.c (bcj_powerpc): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-22 05:22:39 +01:00
parent d46683f97a
commit 84f9d341b0
4 changed files with 12 additions and 5 deletions

View file

@ -143,7 +143,7 @@ grub_affs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
mod = (grub_uint32_t) fileblock % data->htsize;
/* Find the block that points to the fileblock we are looking up by
following the chain until the right table is reached. */
for (curblock = node->last_block_cache + 1; curblock <= target; curblock++)
for (curblock = node->last_block_cache + 1; curblock < target + 1; curblock++)
{
grub_disk_read (data->disk,
node->block_cache[curblock - 1] + data->blocksize - 1,