Quantcast
Viewing all articles
Browse latest Browse all 12198

Bug in above code: TargetValuePtr could potentially be NULL causing failure.

The code above contains a potential bug. In the first time through the while loop, in the statement if (SQLGetData(hStmt, 2, SQL_C_BINARY, pPicture, 0, &pIndicators[1])the pPicture variable, used as the 4th parameter, is in an uninitialized, indeterminate state. Ordinarily, this would not matter, because the 5th parameter, the so-called BufferLength parameter, is 0, and so SQLGetData should never attempt to de-reference this parameter. HOWEVER, SQLGetData requires that this parameter _N

Viewing all articles
Browse latest Browse all 12198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>