Address net-dns additional records empty array

Conversion between packet formats can create empty additional
answers fields, which net-dns cannot handle.

Update net-dns' packet parser to be able to deal with empty arrays
such that it doesn't try to call :data on a nil, which is the only
element of an empty array.

Props to mubix for identifying this issues.
MS-2855/keylogger-mettle-extension
RageLtMan 2017-06-24 20:27:19 -04:00
parent e1e159fa2d
commit 7cc7fe71db
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ module Net # :nodoc:
nscount += 1
end
@additional.each do |rr|
next if rr.nil?
data += rr.data#(data.length)
arcount += 1
end