[getdns-users] bindata string encoding?

Willem Toorop willem at nlnetlabs.nl
Fri Jul 17 17:21:50 UTC 2015


Although I do believe it is quite safe, I did not dare to put it in the
release already.  Next release candidate will have this patch...
-- Willem

Op 13-07-15 om 15:26 schreef Willem Toorop:
> Op 10-07-15 om 18:31 schreef Daniel Kahn Gillmor:
>> I think the right fix is for the python bindings to treat the string as
>> a proper bindata, but i also think that the bindata string returned from
>> the C library in getdns_get_api_info's version_string probably shouldn't
>> have the embedded NUL in it.  Fixing the python bindings before fixing
>> the C library is probably the safest way to go, though.
> 
> I guess it is safe to fix the C library too (but secretly make sure a
> '\0' byte is still underneath; don't tell!).
> 
> In fact, there are very few places where strings are returned in bindata's.
> 
> There is the (superfluous) "address_type" key, in dicts representing IP
> addresses; the "version_string" and "implementation_string" from
> getdns_context_get_api_information() and the bindata's in the list
> returned from getdns_dict_get_names().
> 
> Personally I also prefer not including the trailing '\0' byte.
> 
> Has anyone objections if I change the behaviour?
> (we'd still have our secret safety net... shhht)
> 
> -- Willem
> 




More information about the Users mailing list