[ldns-users] trailing garbage in wire parser
jelte at isc.org
Sun Sep 6 12:17:09 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
robert edmonds brought to my attention something that might or might not be a
problem in ldns; the wire parser does not error if there is trailing garbage
after a dns packet. One could very well say that that is not supposed to happen
and an error should be raised.
Here's a small patch that does that. Although even if included, there is one
more choice to be made; should the packet be freed and NULL returned, or should
the packet be kept in case the one asking for the parsing still wants to have
it? (depends on whether callers check for *pkt == NULL or return value ==
LDNS_STATUS_OK to decide whether or not the pkt should be free'd later, i think
both ways are used by developers) It now does the latter, but freeing it is
probably more consistent, if an error is returned.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 496 bytes
Desc: not available
More information about the ldns-users