check for valid string len

as demonstrated by fdo59762-2.ods

Change-Id: I36cddaba5f664d5d95e9a661eed1cbe9dec1c273