Storage drivers: Fix some broken bounds checks