mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 10:37:24 -04:00 
			
		
		
		
	ci: fuzz: skip fuzz data that contains import (#3214)
				
					
				
			Thus far the fuzzers have found a few crashers in the Caddyfile parser. However, the fuzzer have been stuck at import glob expansion after import glob expansion, which aren't reproducible.
This commit is contained in:
		
							parent
							
								
									7ca15861dd
								
							
						
					
					
						commit
						3634c4593f
					
				| @ -16,7 +16,12 @@ | ||||
| 
 | ||||
| package caddyfile | ||||
| 
 | ||||
| import "bytes" | ||||
| 
 | ||||
| func FuzzParseCaddyfile(data []byte) (score int) { | ||||
| 	if bytes.Contains(data, []byte("import")) { | ||||
| 		return -1 | ||||
| 	} | ||||
| 	sb, err := Parse("Caddyfile", data) | ||||
| 	if err != nil { | ||||
| 		// if both an error is received and some ServerBlocks, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user