krb5 commit: Check for negative poll timeout in k5_sendto_kdc
Greg Hudson
ghudson at MIT.EDU
Fri Jan 25 13:29:17 EST 2013
https://github.com/krb5/krb5/commit/74bee54227deb64a41c2e79f57dd2a2c5ea010a3
commit 74bee54227deb64a41c2e79f57dd2a2c5ea010a3
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
ticket: 7553
target_version: 1.11.1
tags: pullup
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 d8b6a95..8488f6d 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