CodeQL library for C/C++
codeql/cpp-all 0.9.2 ( changelog , source )

Member predicate BufferWrite :: getMaxDataLimited

Gets an upper bound to the amount of data that’s being written (if one can be found), specifying the reason for the estimation, except that float to string conversions are assumed to be much smaller (8 bytes) than their true maximum length. This can be helpful in determining the cause of a buffer overflow issue.

int getMaxDataLimited ( BufferWriteEstimationReason reason )