[nsd-users] maybe a bug for dname_to_string function
Wouter Wijngaards
wouter at nlnetlabs.nl
Thu Nov 29 10:09:54 UTC 2018
Hi James,
On 9/23/18 2:14 PM, James Lin wrote:
> Hi,
> I read the dname_to_string function, it use a static buffer as a return
> value, so if I like a code like as following. the output would be wrong.
> code for wrong output.
Yes that is intentional. The example has the bug you say it has. NSD
is written in this manner, so it is not a bug to fix. But it is well
spotted and definitely a problem in other places, and something to look
at. Thank you for the mention.
Best regards, Wouter
> dname_type *d1;
> dname_type *d2;
> log_msg(LOG_INFO, "%s, %s", dname_to_string(d1), dname_to_string(d2) );
> now, the output which have two dname is repeated,even if the variable d1
> and variable d2 have different domain name.
>
>
>
>
> _______________________________________________
> nsd-users mailing list
> nsd-users at NLnetLabs.nl
> https://open.nlnetlabs.nl/mailman/listinfo/nsd-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20181129/910e2911/attachment.bin>
More information about the nsd-users
mailing list