diff options
author | Nalin Dahyabhai <nalin@dahyabhai.net> | 2014-03-11 13:26:32 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2014-03-13 11:00:47 -0400 |
commit | 1ed3f68c2394fbb48731bba4e4e9a60c8b925ca5 (patch) | |
tree | fba99aa89f1f9bb015d49627ae639ae65ef2ce9f /src/lib/krb5/os/sendto_kdc.c | |
parent | 5fa7e666bd81a2222b155bdf3f0c3fc1bc3fabf5 (diff) | |
download | krb5-1ed3f68c2394fbb48731bba4e4e9a60c8b925ca5.tar.gz krb5-1ed3f68c2394fbb48731bba4e4e9a60c8b925ca5.tar.xz krb5-1ed3f68c2394fbb48731bba4e4e9a60c8b925ca5.zip |
Initialize err variable in krb5_sendto_kdc
When we get an KRB5_KDC_UNREACH error back from k5_sendto, we check if
the err variable we passed for use by our message handler has been set
to KDC_ERR_SVC_UNAVAILABLE. If k5_sendto doesn't receive any
response, though, the handler isn't called, so we're reading an
uninitialized variable. Initialize it to a value other than
KDC_ERR_SVC_UNAVAILABLE to be sure.
[ghudson@mit.edu: initialize err just before calling k5_sendto; edit
commit message]
ticket: 7874 (new)
target_version: 1.12.2
tags: pullup
Diffstat (limited to 'src/lib/krb5/os/sendto_kdc.c')
-rw-r--r-- | src/lib/krb5/os/sendto_kdc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index 828bfffa6..e60a3754e 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -214,6 +214,7 @@ krb5_sendto_kdc(krb5_context context, const krb5_data *message, if (retval) return retval; + err = 0; retval = k5_sendto(context, message, &servers, socktype1, socktype2, NULL, reply, NULL, NULL, &server_used, check_for_svc_unavailable, &err); |