aboutsummaryrefslogtreecommitdiffstats
path: root/gssapi.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-10-04 11:58:22 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-10-04 11:58:22 +0000
commitf61fa6d30aae87b06763e376ca74dfd8d6b4d8b5 (patch)
treec53d6915e32e19b41a79044f6bf5c3abf8c4c1e6 /gssapi.c
parent7225ca9d02426dad6b16182f7783c701e5c7d9c6 (diff)
downloadfetchmail-f61fa6d30aae87b06763e376ca74dfd8d6b4d8b5.tar.gz
fetchmail-f61fa6d30aae87b06763e376ca74dfd8d6b4d8b5.tar.bz2
fetchmail-f61fa6d30aae87b06763e376ca74dfd8d6b4d8b5.zip
Don't call with a potentially bad value.
svn path=/trunk/; revision=3539
Diffstat (limited to 'gssapi.c')
-rw-r--r--gssapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gssapi.c b/gssapi.c
index cfc16d27..8dfb5a69 100644
--- a/gssapi.c
+++ b/gssapi.c
@@ -120,6 +120,8 @@ int do_gssauth(int sock, char *command, char *hostname, char *username)
return result;
}
request_buf.length = from64tobits(buf2, buf1 + 2, sizeof(buf2));
+ if (request_buf.length == -1) /* in case of bad data */
+ request_buf.length = 0
request_buf.value = buf2;
sec_token = &request_buf;
}
@@ -132,6 +134,8 @@ int do_gssauth(int sock, char *command, char *hostname, char *username)
return result;
request_buf.length = from64tobits(buf2, buf1 + 2, sizeof(buf2));
+ if (request_buf.length == -1) /* in case of bad data */
+ request_buf.length = 0
request_buf.value = buf2;
maj_stat = gss_unwrap(&min_stat, context,