Blame SOURCES/ntp-4.2.6p5-decodenetnum.patch

2b78f7
Author:  <stenn@psp-deb1.ntp.org>
2b78f7
Date:   Tue Oct 6 08:51:27 2015 +0000
2b78f7
2b78f7
    [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL on some bogus values.  Harlan Stenn.
2b78f7
2b78f7
diff --git a/libntp/decodenetnum.c b/libntp/decodenetnum.c
2b78f7
index ebcb2da69..35b908f39 100644
2b78f7
--- a/libntp/decodenetnum.c
2b78f7
+++ b/libntp/decodenetnum.c
2b78f7
@@ -36,7 +36,10 @@ decodenetnum(
2b78f7
 	char name[80];
2b78f7
 
2b78f7
 	NTP_REQUIRE(num != NULL);
2b78f7
-	NTP_REQUIRE(strlen(num) < sizeof(name));
2b78f7
+
2b78f7
+	if (strlen(num) >= sizeof(name)) {
2b78f7
+		return 0;
2b78f7
+	}
2b78f7
 
2b78f7
 	port_str = NULL;
2b78f7
 	if ('[' != num[0]) {