The following code is being flagged as a probable out of bounds read vulnerability. I don't understand how this can be an issue because the variable value
should contain the data present in the address of the valuePtr
. I would like to know if the code below is writing the data to value
in an incorrect manner.
long GetItemData(long Index);
double* valuePtr = (double*) GetItemData(1);
double value = *valuePtr;