Merge "Fail explicitly on length overflow." into qt-dev