Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > bceb7b1f665156ac70985435a4c55fed > files > 6

ldns-1.6.17-8.1.mga6.src.rpm

diff -Naur -x '*.orig' -x '*.rej' ldns-1.6.17/parse.c ldns-1.6.17-free-after-reallocing/parse.c
--- ldns-1.6.17/parse.c	2014-01-10 22:04:41.000000000 +0100
+++ ldns-1.6.17-free-after-reallocing/parse.c	2017-12-28 19:04:48.765469884 +0100
@@ -118,6 +118,10 @@
 			if (line_nr) {
 				*line_nr = *line_nr + 1;
 			}
+			if (limit > 0 && (i >= limit || (size_t)(t-token) >= limit)) {
+				*t = '\0';
+				return -1;
+			}
 			*t++ = ' ';
 			prev_c = c;
 			continue;