Comment # 1
on bug 11126
from Guy Harris
format_text() is passed a byte count, so it handles counted strings, not
null-terminated strings. Protocols can have counted strings with embedded NUL
characters, and the NULs should, in those cases, not be treated as terminators.
If format_text() *is* being handed a NUL-terminated string, as in this case, it
should be passed, as its second argument, the count of bytes in the string,
*NOT* including the terminating NUL (e.g., if the length isn't known from
elsewhere, pass strlen(string) - 1, not strlen(string)).
You are receiving this mail because:
- You are watching all bug changes.