diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-10-04 11:58:22 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-10-04 11:58:22 +0000 |
commit | f61fa6d30aae87b06763e376ca74dfd8d6b4d8b5 (patch) | |
tree | c53d6915e32e19b41a79044f6bf5c3abf8c4c1e6 /gssapi.c | |
parent | 7225ca9d02426dad6b16182f7783c701e5c7d9c6 (diff) | |
download | fetchmail-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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, |