checkedc icon indicating copy to clipboard operation
checkedc copied to clipboard

strchr bounds-safe interface

Open AnnaKornfeldSimpson opened this issue 7 years ago • 1 comments

The return value for strchr should have EDIT the same bounds as the input string in its bounds-safe interface. Right now the bounds-safe interface has an interface type but no specific bounds (string_checked.h). In practice programmers will likely then narrow the bounds.

AnnaKornfeldSimpson avatar Aug 02 '18 18:08 AnnaKornfeldSimpson

Expressing the upper bound to be the "same as the argument" is hard. A partial step would be to declare bounds of (arg, return_value). However, my understanding is that return_value doesn't exist yet.

AnnaKornfeldSimpson avatar Aug 03 '18 16:08 AnnaKornfeldSimpson