Merge r1228766 from trunk: optimize this... Do strlen() ONLY if we need to check for overflow. Reviewed/backported by: jim