File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,8 @@ class NBNSQueryResponse(Packet):
185185 ]
186186
187187 def mysummary (self ):
188- if not self .ADDR_ENTRY :
188+ if not self .ADDR_ENTRY or \
189+ not isinstance (self .ADDR_ENTRY [0 ], NBNS_ADD_ENTRY ):
189190 return "NBNSQueryResponse"
190191 return "NBNSQueryResponse '\\ \\ %s' is at %s" % (
191192 self .RR_NAME .decode (errors = "backslashreplace" ),
Original file line number Diff line number Diff line change @@ -99,3 +99,11 @@ assert pkt[NBNSWackResponse].RR_NAME == b'SARAH'
9999z = raw(TCP()/NBTSession())
100100assert z == b'\x00\x8b\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00P\x02 \x00\x00\x00\x00\x00\x00\x00\x00\x00'
101101assert NBTSession in TCP(z)
102+
103+ = OSS-Fuzz Findings
104+
105+ # Note: the packet is corrupted
106+ with no_debug_dissector():
107+ raw_packet = b'E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x05\x00\x00\x00'
108+ packet = NBNSQueryResponse(raw_packet)
109+ assert packet.summary() == "NBNSQueryResponse"
You can’t perform that action at this time.
0 commit comments