diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dh-gex.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dh-gex.c b/src/dh-gex.c index 6c75c69e..9bf0546a 100644 --- a/src/dh-gex.c +++ b/src/dh-gex.c @@ -366,8 +366,13 @@ static bool dhgroup_better_size(uint32_t pmin, */ static bool invn_chance(int n) { - uint32_t nounce; - ssh_get_random(&nounce, sizeof(nounce), 0); + uint32_t nounce = 0; + int ok; + + ok = ssh_get_random(&nounce, sizeof(nounce), 0); + if (!ok) { + return false; + } return (nounce % n) == 0; } |