Added assertion that call to vsnprintf succeeds

v0.27.3
Dan Čermák 8 years ago
parent f641f39ab9
commit 06cafadf4f

@ -1004,6 +1004,7 @@ namespace Exiv2 {
va_start(args, format); // args start after format
rc = vsnprintf(&buffer[0], buffer.size(), format, args);
va_end(args); // free the args
assert(rc >= 0); // rc < 0 => we have made an error in the format string
if ( rc > 0 )
need = static_cast<size_t>(rc);
} while ( buffer.size() <= need );

Loading…
Cancel
Save