vhost/crypto: fix possible out of bound access