check for at least one readable byte for length

Summary:
Restores the functionality changed in
d1e1b530a317450a827e6fe283f0927f25c7cab8

Tests to show the behavior expected