dh-gex: Add missing goto error

Originally reported by Saransh Rana.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Pavol Žáčik <pzacik@redhat.com>
Merge-Request: <https://gitlab.com/libssh/libssh-mirror/-/merge_requests/825>
This commit is contained in:
Jakub Jelen
2026-04-28 16:27:50 +02:00
parent 172dfe8d00
commit 322b456790

View File

@@ -162,6 +162,7 @@ SSH_PACKET_CALLBACK(ssh_packet_client_dhgex_group)
if (bignum_cmp(modulus, one) <= 0) {
/* p must be positive and preferably bigger than one */
ssh_set_error(session, SSH_FATAL, "Invalid dh group parameter p");
goto error;
}
if (!bignum_is_bit_set(modulus, 0)) {
/* p must be a prime and therefore not divisible by 2 */