log: fix -L bounds checking bug