]> git.lizzy.rs Git - plan9front.git/commit
snoopy: fix dns nil pointer crashes when formating dns packets (thanks sl)
authorcinap_lenrek <cinap_lenrek@felloff.net>
Wed, 18 Aug 2021 17:59:50 +0000 (17:59 +0000)
committercinap_lenrek <cinap_lenrek@felloff.net>
Wed, 18 Aug 2021 17:59:50 +0000 (17:59 +0000)
commit97c6a1dd521c893de2c26b8876cdda283fdd7dc8
tree51337d93a1a18c710505b44eeae90636492889ce
parentb0ae37013cf58b5cdeb67bb0b182669be1540aa9
snoopy: fix dns nil pointer crashes when formating dns packets (thanks sl)

snoopy shares ndb/dns's dns parser code, but has its own
copy of rralloc() function, which is responsible to allocating
auxiolary data structures on an RR depending on the type.

ndb/dns gained some support for some new types, but snoopy's
copy of rralloc() was not updated, resulting the auxiolary
structures to be nil, and the shared parsing routines crashes
when trying to dereference them.

this just syncs the copies, we might consider moving rralloc()
into its own file so it can be completely shared.
sys/src/cmd/ip/snoopy/dns.c