fdo#79941: Properly handle short reads

Change-Id: Ie762ff272410d809382f98a1d446946b566df747