aboutsummaryrefslogblamecommitdiffstats
path: root/main/sipsak/fix-aaaa-record-segfault.patch
blob: 31f5dba373a746c9953fdeab2b673c1663ef4114 (plain) (tree)



















                                                             
--- ./helper.c.orig	2015-03-17 15:34:48.109903801 -0100
+++ ./helper.c	2015-03-17 16:08:02.954490213 -0100
@@ -284,6 +284,8 @@
 			aptr = parse_rr(aptr, abuf, alen);
 		else
 			aptr = skip_rr(aptr, abuf, alen);
+		if (aptr == NULL)
+			return;
 	}
 	if (caadr == 0) {
 		for (i = 0; i < nscount; i++) {
@@ -291,6 +293,8 @@
 		}
 		for (i = 0; i < arcount && caadr == 0; i++) {
 			aptr = parse_rr(aptr, abuf, alen);
+			if (aptr == NULL)
+				return;
 		}
 	}
 }