Fix handling of potential buffer underruns.