summaryrefslogtreecommitdiffstats
path: root/libssh/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/options.c')
-rw-r--r--libssh/options.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libssh/options.c b/libssh/options.c
index b18aa37f..2f8a68a6 100644
--- a/libssh/options.c
+++ b/libssh/options.c
@@ -513,7 +513,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
} else {
long *x = (long *) value;
- session->timeout = *x;
+ session->timeout = *x & 0xffffffff;
}
break;
case SSH_OPTIONS_TIMEOUT_USEC:
@@ -523,7 +523,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
} else {
long *x = (long *) value;
- session->timeout_usec = *x;
+ session->timeout_usec = *x & 0xffffffff;
}
break;
case SSH_OPTIONS_SSH1:
@@ -541,7 +541,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
return -1;
} else {
int *x = (int *) value;
- session->ssh2 = *x;
+ session->ssh2 = *x & 0xffff;
}
break;
case SSH_OPTIONS_LOG_VERBOSITY:
@@ -551,7 +551,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
} else {
int *x = (int *) value;
- session->log_verbosity = *x;
+ session->log_verbosity = *x & 0xffff;
}
case SSH_OPTIONS_LOG_VERBOSITY_STR:
if (value == NULL) {