From a3db7a4f849f52105b13fa412e64fc76c6b2895b Mon Sep 17 00:00:00 2001
From: Steve Grubb <sgrubb@redhat.com>
Date: Thu, 5 Aug 2021 21:51:33 -0400
Subject: [PATCH 2182/2246] Check for fuzzer induced invalid value

---
 auparse/ellist.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/auparse/ellist.c b/auparse/ellist.c
index 17384a7..175e44e 100644
--- a/auparse/ellist.c
+++ b/auparse/ellist.c
@@ -151,6 +151,9 @@ static int parse_up_record(rnode* r)
 			n.val = strdup(val);
 			// Remove trailing punctuation
 			len = strlen(n.val);
+			// Check for invalid val
+			if (!len)
+				continue;
 			if (len && n.val[len-1] == ':') {
 				n.val[len-1] = 0;
 				len--;
-- 
1.8.3.1

