mirror of
				https://github.com/v2fly/v2ray-core.git
				synced 2025-10-31 01:39:16 +00:00 
			
		
		
		
	Fix: core panics when zero domain/full type of rule (#786)
This commit is contained in:
		
							parent
							
								
									f9ac31853e
								
							
						
					
					
						commit
						c71ae9b310
					
				| @ -94,6 +94,10 @@ func (g *MphMatcherGroup) Build() { | ||||
| 		g.ac.Build() | ||||
| 	} | ||||
| 	keyLen := len(*g.ruleMap) | ||||
| 	if keyLen == 0 { | ||||
| 		keyLen = 1 | ||||
| 		(*g.ruleMap)["empty___"] = RollingHash("empty___") | ||||
| 	} | ||||
| 	g.level0 = make([]uint32, nextPow2(keyLen/4)) | ||||
| 	g.level0Mask = len(g.level0) - 1 | ||||
| 	g.level1 = make([]uint32, nextPow2(keyLen)) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 DarthVader
						DarthVader