Fix hang in the case of a corrupted PNG chunk length