Your problem seems to be that you want to use the C string library to handle arrays of arbitrary bytes. I will not work, it's not what it was designed to do.
What every C Programmer should know about undefined behavior #2/3
Posted May 19, 2011 15:49 UTC (Thu) by stijn (subscriber, #570)
[Link]
Just to clarify, I can deal with both the string library and the mem functions. When I come to LWN, I hope to engage in constructive conversation, not chest-beating.