krb5 commit [krb5-1.10]: Check for negative poll timeout in k5_sendto_kdc
Tom Yu
tlyu at MIT.EDU
Fri Feb 22 18:01:16 EST 2013
https://github.com/krb5/krb5/commit/4fcd8cea7ee1594c25b9e7eec42ae3ce6775d93a
commit 4fcd8cea7ee1594c25b9e7eec42ae3ce6775d93a
Author: Greg Hudson <ghudson at mit.edu>
Date: Fri Jan 25 13:11:27 2013 -0500
Check for negative poll timeout in k5_sendto_kdc
(cherry picked from commit 74bee54227deb64a41c2e79f57dd2a2c5ea010a3)
ticket: 7578 (new)
version_fixed: 1.10.4
status: resolved
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. */
More information about the cvs-krb5
mailing list