> In this particular case, I would argue that the most flexible response 
> is for the library to return exactly what it got, unless the user has
> requested interpretation (that is, the _ascii version). In that case, 
> we can be free to reject bad data.

What about adding a `_unicode` version then that *does* perform some
sanity checks? Like an even length, length >= 4, type is string.

libusbx should be flexible enough to reduce code duplication.

---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/pull/156#issuecomment-27800310
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to