libexplain  1.4.D001
Functions
libexplain/is_efault.h File Reference
#include <libexplain/ac/stddef.h>

Go to the source code of this file.

Functions

int explain_is_efault_path (const char *path)
int explain_is_efault_pointer (const void *data, size_t data_size)
int explain_is_efault_string (const char *data)

Function Documentation

int explain_is_efault_path ( const char *  path)

The explain_is_efault_path function may be used to determine whether or not a path pointer is a valid pointer. Typically this is used when handling ambiguous EFAULT situations.

Parameters:
pathThe path to be checked.
Returns:
int; 1 if the path is bad (points outside the process address space), or 0 if the path is OK.

Definition at line 27 of file path.c.

int explain_is_efault_pointer ( const void *  data,
size_t  data_size 
)

The explain_is_efault_pointer function may be used to determine whether or not a pointer is valid. Typically this is used when handling ambiguous EFAULT situations.

Parameters:
dataPointer to the base address of the memory to be checked.
data_sizeThe size in bytes of the memory to be checked (i.e. you can use sizeof(*data) in most situations).
Returns:
int; 1 if the pointer is bad (points outside the process address space), or 0 if the pointer is OK.

Definition at line 29 of file pointer.c.

int explain_is_efault_string ( const char *  data)

The explain_is_efault_string function may be used to determine whether or not a C string is valid. Typically this is used when handling ambiguous EFAULT situations.

Parameters:
dataPointer to the base address of the memory to be checked.
Returns:
int; 1 if the C string is bad (points outside the process address space), or 0 if the C string is OK.

Definition at line 29 of file string.c.