Skip to content

Commit

Permalink
MVE: Make vsnprinf() usage more robust
Browse files Browse the repository at this point in the history
Use sizeof() instead of hardcoding string length when calling
vsnprintf().

Fixes: 247ea30 ("MVE: Replace vsprintf() with vsnprintf()")
  • Loading branch information
andre-schulz committed Sep 2, 2024
1 parent 24a3f7a commit a0e4e27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/mve/image_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ void
tiff_error_handler (char const* /*module*/, char const* fmt, va_list ap)
{
char msg[2048];
::vsnprintf(msg, 2048, fmt, ap);
::vsnprintf(msg, sizeof(msg), fmt, ap);
throw util::Exception(msg);
}

Expand Down

0 comments on commit a0e4e27

Please sign in to comment.