@RichFelker My preferred solution, by far, would be to deprecate and remove *all* str* functions from the standard.
-
-
-
@stephentyrone I hope you just mean str[n]{cpy,cat}. strlen, strchr, strstr, strspn, strcspn, etc. are all pretty damn useful. -
@RichFelker I would keep strnlen. -
@RichFelker (because you need it to convert "legacy" strings to explicit-length, which everything else should use) -
@stephentyrone@richfelker what reasonable length are you going to pass for a "legacy" string? -
@bmastenbrook@RichFelker For most cases a reasonable bound is possible. Otherwise, –1 is equivalent to whatever you do today. -
@stephentyrone@richfelker <-- this is my skeptical face -
@bmastenbrook@RichFelker I'll take skepticism over buffer overflows every time.
End of conversation
New conversation -
-
-
@RichFelker Thanks, interesting thread!Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.