Remove possible RCE in cipher selection

Unlikely to be exploited but still better fixed.