Added assertion that call to vsnprintf succeeds
This commit is contained in:
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…
Reference in New Issue
Block a user