Blame SOURCES/authd-1.4.3-jiffies64.patch

7a8b95
diff -up authd-1.4.3/authd.c.jiffies64 authd-1.4.3/authd.c
7a8b95
--- authd-1.4.3/authd.c.jiffies64	2004-11-16 00:25:24.000000000 +0100
7a8b95
+++ authd-1.4.3/authd.c	2008-03-25 11:22:35.000000000 +0100
7a8b95
@@ -347,6 +347,22 @@ static void create_opt(int argc, char *a
7a8b95
 
7a8b95
 static const char *const DELIM = ",: \t\r\n\v\f";
7a8b95
 
7a8b95
+static unsigned long long get_tok_ullong(char *s, unsigned base) {
7a8b95
+    unsigned long long ull = ULLONG_MAX;
7a8b95
+
7a8b95
+    assert(base <= 36);
7a8b95
+    if ((s = strtok(s, DELIM)) != NULL) {
7a8b95
+        char *endptr;
7a8b95
+
7a8b95
+        ull = strtoull(s, &endptr, (int) base);
7a8b95
+        if ((errno == ERANGE && ull == ULLONG_MAX) || is_bad_strto(s, endptr))
7a8b95
+            errno = EINVAL;
7a8b95
+    }
7a8b95
+    else errno = EINVAL;
7a8b95
+    return ull;
7a8b95
+}
7a8b95
+
7a8b95
+
7a8b95
 static unsigned long get_tok_uint(char *s, unsigned base) {
7a8b95
     unsigned long ul = ULONG_MAX;
7a8b95
 
7a8b95
@@ -643,7 +659,7 @@ static bool get_info(reply_t *out, reque
7a8b95
         (void) get_tok_uint(NULL, 16);            // tx_queue
7a8b95
         (void) get_tok_uint(NULL, 16);            // rx_queue
7a8b95
         (void) get_tok_uint(NULL, 16);            // tr (boolean)
7a8b95
-        (void) get_tok_uint(NULL, 16);            // tm->when (unit: jiffies)
7a8b95
+        (void) get_tok_ullong(NULL, 16);            // tm->when (unit: jiffies)
7a8b95
         strtok(NULL, DELIM);                      // retrnsmt
7a8b95
         uid = get_tok_uint(NULL, 10);             // uid (base 10 uint)
7a8b95
         strtok(NULL, DELIM);                      // timeout