rsaenh: Move type-check before len-check (Coverity).