3 ms·
find + substring indexing An endless source of off-by-one errors, not to mention buffer overflows, index out of bounds exceptions, accidental negative indexing
by wruza 5y ago
find + substring indexing
An endless source of off-by-one errors, not to mention buffer overflows, index out of bounds exceptions, accidental negative indexing.
- marginalia_nu 5y agoHow are you both getting buffer overflows and bounds check failures in the same code? Anyway, these are problems that arise if you don't test the code. In that scenario, regexps are an endless source of unexpected behavior as well, including in some implementations stack overflows and ReDoS attack-surfaces.