News for hackers. Stuff that matters.
Re:Designing a better strcpy by WalterBright on Saturday June 19, 2021 @06:45PM (#27565203)
Won't work with UTF-8.
Re:Designing a better strcpy by thrwaeasddsaf on Saturday June 19, 2021 @07:49PM (#27565650)
Works with any encoding and arbitrary binary data. The last byte of the length field doesn't have the high bit set, and whatever follows after that is completely irrelevant.

But still needless complexity for this.

Re:Designing a better strcpy by moonchild on Saturday June 19, 2021 @10:31PM (#27566587)
Sure it is, the length is out of band. In fact, you could even use utf-8 to encode the length!