1rangecheck(3) Library Functions Manual rangecheck(3)
2
3
4
6 rangecheck.h - pointer range checking
7
9 #include <rangecheck.h>
10
11 int range_validbuf(const void* buf,size_t len);
12
13 int range_ptrinbuf(const void* buf,size_t len,const void* ptr);
14
15 int range_bufinbuf(const void* buf1,size_t len1,
16 const void* buf2,size_t len2);
17
18 int range_arrayinbuf(const void* buf,size_t len,
19 const void* arraystart,
20 size_t elements,size_t membersize);
21
22 int range_strinbuf(const void* buf,size_t len,const void* string);
23
24 int range_str2inbuf(const void* buf,size_t len,const void* string);
25
26 int range_str4inbuf(const void* buf,size_t len,const void* string);
27
28
30 rangecheck.h provides several routines for range checking pointers.
31 These routines are meant for code that has to validate the syntax and
32 semantics of buffers coming in from untrusted sources (like a network
33 connection or an input file).
34
35
37 The routines all return 0 on error, or 1 if the pointers were in range.
38
39
41 range_validbuf(3), range_ptrinbuf(3), range_bufinbuf(3), range_arrayinâ
42 buf(3), range_strinbuf(3), range_str2inbuf(3), range_str4inbuf(3)
43
44
45
46 rangecheck(3)