bool is_bad_string_pointer(const character* string, unsigned maximum_size)
This function checks if the caller has read access to the specified memory range.
const character* string
A pointer to the null-terminated string being tested.
unsigned maximum_size
The number maximum of bytes of which the range consists. The string is tested up to the null-terminator or to the maximum number of bytes specified by this parameter - which ever comes first.
bool
false | The application has read access to the memory range. |
true | The application does not have read access to the memory range. |
If the application has read access to some but not all bytes in the specified range, true is returned.
If the application is compiled with debugging switched on and the process does not have read access, this function causes an assertion and breaks into the debugger. Upon leaving the debugger, this function continues and returns a nonzero value.