Re: maybe a bug for dname_to_string function
Wouter Wijngaards <[email protected]>
| Newsgroups | gmane.network.dns.nsd.general |
|---|---|
| Message-ID | <[email protected]> |
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 > [email protected] > https://open.nlnetlabs.nl/mailman/listinfo/nsd-users > _______________________________________________ nsd-users mailing list [email protected] https://open.nlnetlabs.nl/mailman/listinfo/nsd-users
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE7fqj8spObrBWga+On28cLX4EX40FAlv/uvIACgkQn28cLX4E X40Vjw/9GJtKyibyf9D8cuXkaZUQ+O1tPzzVcx7irbjbYkfLm/rJY3QgK9qwLuVw LknCWurWnfInyHZr2e27LOI+sfJTfVUko+nu1caHTzb1XKhG68ZhvM2rh1iGwuAc EZpZnpZBO39vTnXsY3mYCHGPuZUqnPF/qipdrfEW58sa5USrb8VS5liO0MUOpVVc KXoAgr2WJNKqHEj+HFzSmTYKAE7v+VaSYpsbEuHS3GagxkuoXTBj1ph+YGM9SPg5 NUi8JY1+NgPFHeTM6va/q5r82EYYj98N7TeI2IWhNt9T03SS/DemSRqykSrO1MMo MHZPUFlGa4NdHLZ3UfIZNBLOjgC1Ii7a3k8vMH/GbyjIsLhACny0HdWgNJ4DFh/z qnSn/AUji2ZJAHn44GWFeftSspJC1dKYm0NBz/4vSJs3rI7n9c7+HwzZkB0tncME FRocdNWV0ItfRduT31DGElokPXJGTimMiZRnT/fMwGB8JiefN9MqnGSFoWus7dif naUk9eZeJjdJFDpj884mFntmj6tPGpL4SkhGrMjvt1xwDxDzDW4L99axf+Q8mqRJ JiRGpzx7fMIWwRk5qDZYzreQKNM6Fbyk5lgUy19UxcCRrf54uebf9qgK6tQQsD36 d8vnOq68+hVvto7rWZAQjqsM1d7YeOrOaqOIIPlfuuQAM558un0= =Rge7 -----END PGP SIGNATURE-----