mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-06-11 12:56:21 +09:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user