mirror of
				https://github.com/miekg/dns.git
				synced 2025-11-04 12:41:01 +01:00 
			
		
		
		
	packStructValue: fix a overflow in NSEC packing
This commit is contained in:
		
							parent
							
								
									b5133fead4
								
							
						
					
					
						commit
						0df69faa6e
					
				
							
								
								
									
										2
									
								
								msg.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								msg.go
									
									
									
									
									
								
							@ -785,7 +785,7 @@ func packStructValue(val reflect.Value, msg []byte, off int, compression map[str
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
					length = (t - window*256) / 8
 | 
										length = (t - window*256) / 8
 | 
				
			||||||
					bit := t - (window * 256) - (length * 8)
 | 
										bit := t - (window * 256) - (length * 8)
 | 
				
			||||||
					if off+2+int(length) > lenmsg {
 | 
										if off+2+int(length)+1 > lenmsg {
 | 
				
			||||||
						return lenmsg, &Error{err: "overflow packing nsecx bitmap"}
 | 
											return lenmsg, &Error{err: "overflow packing nsecx bitmap"}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user