Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

stralloc_copyb(3) [debian man page]

stralloc_copyb(3)					     Library Functions Manual						 stralloc_copyb(3)

NAME
stralloc_copyb - copy data into a stralloc SYNTAX
#include <stralloc.h> int stralloc_copyb(stralloc* sa,const char* buf,size_t len); DESCRIPTION
stralloc_copyb makes sure that sa has enough space allocated to hold len bytes. Then it copies the first len bytes from buf into the stralloc. The data that sa previously contained is overwritten and truncated. If stralloc_copys runs out of memory, stralloc_copys leaves sa alone and return 0, otherwise it returns 1. RETURN VALUE
1 for success, 0 on memory allocation failure. stralloc_copyb(3)

Check Out this Related Man Page

rangecheck(3)						     Library Functions Manual						     rangecheck(3)

NAME
rangecheck.h - pointer range checking SYNTAX
#include <rangecheck.h> int range_validbuf(const void* buf,size_t len); int range_ptrinbuf(const void* buf,size_t len,const void* ptr); int range_bufinbuf(const void* buf1,size_t len1, const void* buf2,size_t len2); int range_arrayinbuf(const void* buf,size_t len, const void* arraystart, size_t elements,size_t membersize); int range_strinbuf(const void* buf,size_t len,const void* string); int range_str2inbuf(const void* buf,size_t len,const void* string); int range_str4inbuf(const void* buf,size_t len,const void* string); DESCRIPTION
rangecheck.h provides several routines for range checking pointers. These routines are meant for code that has to validate the syntax and semantics of buffers coming in from untrusted sources (like a network connection or an input file). RETURN VALUE
The routines all return 0 on error, or 1 if the pointers were in range. SEE ALSO
range_validbuf(3), range_ptrinbuf(3), range_bufinbuf(3), range_arrayinbuf(3), range_strinbuf(3), range_str2inbuf(3), range_str4inbuf(3) rangecheck(3)
Man Page