Blame SOURCES/ntp-4.2.6p5-cve-2015-5194.patch

063937
commit 553f2fa65865c31c5e3c48812cfd46176cffdd27
063937
Author:  <davehart@shiny.ad.hartbrothers.com>
063937
Date:   Wed Jul 28 05:33:53 2010 +0000
063937
063937
    [Bug 1593] ntpd abort in free() with logconfig syntax error.
063937
063937
diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y
063937
index b3f7ac3..cf8942f 100644
063937
--- a/ntpd/ntp_parser.y
063937
+++ b/ntpd/ntp_parser.y
063937
@@ -995,14 +995,24 @@ log_config_list
063937
 log_config_command
063937
 	:	T_String
063937
 		{
063937
-			char prefix = $1[0];
063937
-			char *type = $1 + 1;
063937
+			char	prefix;
063937
+			char *	type;
063937
 			
063937
-			if (prefix != '+' && prefix != '-' && prefix != '=') {
063937
-				yyerror("Logconfig prefix is not '+', '-' or '='\n");
063937
-			}
063937
-			else
063937
-				$$ = create_attr_sval(prefix, estrdup(type));
063937
+			switch ($1[0]) {
063937
+			
063937
+			case '+':
063937
+			case '-':
063937
+			case '=':
063937
+				prefix = $1[0];
063937
+				type = $1 + 1;
063937
+				break;
063937
+				
063937
+			default:
063937
+				prefix = '=';
063937
+				type = $1;
063937
+			}	
063937
+			
063937
+			$$ = create_attr_sval(prefix, estrdup(type));
063937
 			YYFREE($1);
063937
 		}
063937
 	;