4 ms·
> Ultimately, the only safe way is to use Pascal string-style length prefixes. Note that length-prefixes aren't necessarily safer when nested. For example, `li
by chriswarbo 5y ago
> Ultimately, the only safe way is to use Pascal string-style length prefixes.
Note that length-prefixes aren't necessarily safer when nested. For example, `line(10 bytes, [cell(1000 bytes, "xxxxxxx...`. This can lead to vulnerabilities like buffer overflows (naively allocating 10 bytes for the line, then trying to put 1000 bytes into it)
- Nullabillity 5y agoSure, without bounds-checking all hope is lost, but then you're in a hopeless place anyway.