summaryrefslogtreecommitdiffstats
path: root/src/sss_client
diff options
context:
space:
mode:
Diffstat (limited to 'src/sss_client')
-rw-r--r--src/sss_client/ssh/sss_ssh_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sss_client/ssh/sss_ssh_client.c b/src/sss_client/ssh/sss_ssh_client.c
index 245a02056..e5097337f 100644
--- a/src/sss_client/ssh/sss_ssh_client.c
+++ b/src/sss_client/ssh/sss_ssh_client.c
@@ -171,7 +171,7 @@ sss_ssh_get_ent(TALLOC_CTX *mem_ctx,
/* parse reply */
c = 0;
- if (rep_len-c < 2*sizeof(uint32_t)) {
+ if (rep_len < c + 2*sizeof(uint32_t)) {
ret = EINVAL;
goto done;
}
@@ -214,7 +214,7 @@ sss_ssh_get_ent(TALLOC_CTX *mem_ctx,
SAFEALIGN_COPY_UINT32(&len, rep+c, &c);
- if (rep_len-c < len + sizeof(uint32_t)) {
+ if (len > rep_len - c - sizeof(uint32_t)) {
ret = EINVAL;
goto done;
}
@@ -237,7 +237,7 @@ sss_ssh_get_ent(TALLOC_CTX *mem_ctx,
SAFEALIGN_COPY_UINT32(&len, rep+c, &c);
- if (rep_len-c < len) {
+ if (len > rep_len - c) {
ret = EINVAL;
goto done;
}