Avoid out-of-bounds write in SSL_get_shared_ciphers

PR: 3317