OK, I've made a pull request for this change, removing printf from the API except where it's really obvious. It breaks CZMQ compatibility for some apps, sadly. Better security, arguably worth it.
On Mon, Jan 20, 2014 at 9:22 PM, Greg Ward <[email protected]> wrote: > On 18 January 2014, Pieter Hintjens said: >> Yes, I thought it was cool to make a few of the string functions, like >> zstr_send, accept printf formats. I've also been bitten more than once >> by that. >> >> Perhaps we can consider this API style to be broken, and dangerous, >> and remove the printf formatting from zstr_send, putting it into >> zstr_sendf instead? >> >> There are a bunch of other cases like this. It'll break the CZMQ API >> but I think it's justified if we're fixing a design fault. > > Agreed. It's a nice convenience for C programmers, but unnecessary and > risky for high-level bindings. E.g. the Python binding could just > ignore zstr_sendf() -- I imagine most Python programmers would reach > for Python's string-formatting facilities first. > > Greg > -- > Greg Ward http://www.gerg.ca > <[email protected]> @gergdotca > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
