1range_strinbuf(3)          Library Functions Manual          range_strinbuf(3)
2
3
4

NAME

6       range_strinbuf - range check for string in buffer
7

SYNTAX

9       #include <rangecheck.h>
10
11       int range_strinbuf(const void* buf,size_t len,const void* stringstart);
12

DESCRIPTION

14       range_strinbuf  checks  that  the ASCIIZ-string starting at stringstart
15       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

RETURN VALUE

21       If  the  buffer  is  implausible (buf is NULL or buf+len has an integer
22       overflow), return 0.
23
24       If stringstart points before or after the buffer, return 0.
25
26       If there is no '\0' within the buffer, return 0.
27
28       Otherwise, return 1.
29

SEE ALSO

31       rangecheck(3)
32
33
34
35                                                             range_strinbuf(3)
Impressum