dc: Parse error & fix out of bounds read in xc_program_printString
function old new delta xc_program_print 712 735 +23 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		
				
					committed by
					
						
						Denys Vlasenko
					
				
			
			
				
	
			
			
			
						parent
						
							b64470be17
						
					
				
				
					commit
					10509a70ee
				
			@@ -59,6 +59,26 @@ testing "dc: x should work with strings created from a" \
 | 
			
		||||
	"42\n" \
 | 
			
		||||
	"" ""
 | 
			
		||||
 | 
			
		||||
testing "dc: p should print invalid escapes" \
 | 
			
		||||
	"dc -e '[\q] p'" \
 | 
			
		||||
	"\\q\n" \
 | 
			
		||||
	"" ""
 | 
			
		||||
 | 
			
		||||
testing "dc: p should print trailing backslashes" \
 | 
			
		||||
	"dc -e '[q\] p'" \
 | 
			
		||||
	"q\\\\\n" \
 | 
			
		||||
	"" ""
 | 
			
		||||
 | 
			
		||||
testing "dc: p should parse/print single backslashes" \
 | 
			
		||||
	"dc -e '[\] p'" \
 | 
			
		||||
	"\\\\\n" \
 | 
			
		||||
	"" ""
 | 
			
		||||
 | 
			
		||||
testing "dc: p should print single backslash strings" \
 | 
			
		||||
	"dc -e '92 a p'" \
 | 
			
		||||
	"\\\\\n" \
 | 
			
		||||
	"" ""
 | 
			
		||||
 | 
			
		||||
testing "dc read" \
 | 
			
		||||
	"dc -finput" \
 | 
			
		||||
	"2\n9\n1\n" \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user