1range_str4inbuf(3) Library Functions Manual range_str4inbuf(3)
2
3
4
6 range_str4inbuf - range check for string in buffer
7
9 #include <rangecheck.h>
10
11 int range_str4inbuf(const void* buf,size_t len,const void* string);
12
14 range_str4inbuf checks that the zero terminated UTF-32-string starting
15 at string starts and ends within the buffer buf[0..len-1].
16
17 If the string is not 0-terminated but the length is known beforehand,
18 use range_arrayinbuf instead.
19
21 If the buffer is implausible (buf is NULL or buf+len has an integer
22 overflow), return 0.
23
24 If string points before or after the buffer, return 0.
25
26 If there is no zero terminator within the buffer, return 0.
27
28 Otherwise, return 1.
29
31 rangecheck(3)
32
33
34
35 range_str4inbuf(3)