mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
dh_crypto: Use size_t for loop variable
Also don't declare the variable in the loop. Fixes #157 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -96,12 +96,14 @@ int ssh_dh_get_parameters(struct dh_ctx *ctx,
|
|||||||
int ssh_dh_set_parameters(struct dh_ctx *ctx,
|
int ssh_dh_set_parameters(struct dh_ctx *ctx,
|
||||||
const bignum modulus, const bignum generator)
|
const bignum modulus, const bignum generator)
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if ((ctx == NULL) || (modulus == NULL) || (generator == NULL)) {
|
if ((ctx == NULL) || (modulus == NULL) || (generator == NULL)) {
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 2; i++) {
|
|
||||||
|
for (i = 0; i < 2; i++) {
|
||||||
bignum p = NULL;
|
bignum p = NULL;
|
||||||
bignum g = NULL;
|
bignum g = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user