Description: Fix failure when inet_aton fails
 When inet_aton fails, log the failure. Also, catch the NULL return from
 ticket_digest and return false instead of crashing.
 This happens when the client connects using IPv6. Checking IPv6 addresses is
 currently not supported. Setting TKTAuthIgnoreIP on (not checking IP
 addresses) does work with IPv6.
Author: Ivo De Decker <ivodd@debian.org>
Last-Update: 2019-01-26

Index: libapache2-mod-auth-tkt/src/mod_auth_tkt.c
===================================================================
--- libapache2-mod-auth-tkt.orig/src/mod_auth_tkt.c
+++ libapache2-mod-auth-tkt/src/mod_auth_tkt.c
@@ -841,6 +841,8 @@
 
   /* Convert remote_ip to unsigned long */
   if (inet_aton(remote_ip, &ia) == 0) {
+    ap_log_rerror(APLOG_MARK, APLOG_WARNING, APR_SUCCESS, r,
+      "Converting remote_ip to long failed");
     return (NULL);
   }
   ip = ntohl(ia.s_addr);
@@ -953,6 +955,7 @@
 
   /* Check ticket hash against a calculated digest using the current secret */
   digest = ticket_digest(r, parsed, 0, sconf->secret);
+  if (!digest) return 0;
   if (memcmp(ticket, digest, sconf->digest_sz) != 0) {
 
     /* Digest mismatch - if no old secret set, fail */
