Only fill total_size in CheckBufferOverrun::checkFunctionParameter when useful

Hi,

I've noticed that we systematically fill some map in CheckBufferOverrun::checkFunctionParameter and right after clear it out if some condition is met. This patch only fills the map if that condition is not met. Thanks to consider merging.

Cheers,
  Simon