problems in Pointer overflow/underflow
-
Testing VC++ code for pointer underflow/overflow for data type char *. knarasimharao
-
Testing VC++ code for pointer underflow/overflow for data type char *. knarasimharao
I suppose you can check the index into the string, and the size of the string, which was allocated, so that the index should be less than the size, and always greater or equal to zero. You can use:
AfxIsValidString(...) AfxIsValidAddress(...)
to check that the address is readable/writable. this is this. -
Testing VC++ code for pointer underflow/overflow for data type char *. knarasimharao
so, the question is ? :confused: did you read the How to get an answer to you question[^] admin message ?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -- modified at 6:44 Saturday 19th November, 2005 -
I suppose you can check the index into the string, and the size of the string, which was allocated, so that the index should be less than the size, and always greater or equal to zero. You can use:
AfxIsValidString(...) AfxIsValidAddress(...)
to check that the address is readable/writable. this is this.