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

NAME

6       range_bufinbuf - range check for buf in buffer
7

SYNTAX

9       #include <rangecheck.h>
10
11       int range_bufinbuf(const void* buf1,size_t len1,
12                          const void* buf2,size_t len2);
13
14

DESCRIPTION

16       range_bufinbuf  checks that the buffer buf2[0..len2-1] lies entirely in
17       buf1[0..len1].
18
19       If the buffer is 0-terminated and you don't know the length beforehand,
20       use range_strinbuf, range_str2inbuf or range_str4inbuf instead.
21

RETURN VALUE

23       If  one  of  the  buffers is implausible (buf is NULL or buf+len has an
24       integer overflow), return 0.
25
26       If the buf2[0..len2-1] lies before or after buf1[0..len1-1], return 0.
27
28       Otherwise, return 1.
29

SEE ALSO

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