It would be desirable to have some protection when converting binary data to strings if the binary data was ill-formed (not nul-terminated). This may not be possible in all cases as C API's frequently pass around pointers without target size information but at least a check should be made in cases where size is known.