News for hackers. Stuff that matters.
Re:Beware of strncpy and strncat by MBCook on Wednesday June 06, 2018 @02:45PM (#17249879)
But just adding the null byte isn’t necessarily safe if you’re dealing with Unicode, right?
Re:Beware of strncpy and strncat by loeg on Wednesday June 06, 2018 @04:05PM (#17250609)
Correct. You can't just truncate a utf-8 stream in an arbitrary byte position and expect it to remain well-formed.