diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-01-25 13:11:27 -0500 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2013-02-22 17:56:12 -0500 |
commit | 4fcd8cea7ee1594c25b9e7eec42ae3ce6775d93a (patch) | |
tree | aed1ba4b9de0e994314aae67e6175d549414eda5 /src/lib | |
parent | dfa3dbb2f5c6d7d32d97c179f6c34e0dbb554111 (diff) | |
download | krb5-4fcd8cea7ee1594c25b9e7eec42ae3ce6775d93a.zip krb5-4fcd8cea7ee1594c25b9e7eec42ae3ce6775d93a.tar.gz krb5-4fcd8cea7ee1594c25b9e7eec42ae3ce6775d93a.tar.bz2 |
Check for negative poll timeout in k5_sendto_kdc
(cherry picked from commit 74bee54227deb64a41c2e79f57dd2a2c5ea010a3)
ticket: 7578 (new)
version_fixed: 1.10.4
status: resolved
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb5/os/sendto_kdc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index 63dbcd8..7ee5951 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -523,6 +523,10 @@ cm_select_or_poll(const struct select_state *in, struct select_state *out, return e; timeout = (in->end_time.tv_sec - now.tv_sec) * 1000 + (in->end_time.tv_usec - now.tv_usec) / 1000; + if (timeout < 0) { + *sret = 0; + return 0; + } } /* We don't need a separate copy of the selstate for poll, but use one * anyone for consistency with the select wrapper. */ |