Avoid buffer overflow in Log.

This commit is contained in:
Daniel Caujolle-Bert 2025-03-04 16:56:06 +01:00
parent 351c1199fb
commit 27d099c5b7
No known key found for this signature in database
GPG key ID: 51AED7171EC00614

View file

@ -167,7 +167,7 @@ void Log(unsigned int level, const char* fmt, ...)
va_list vl;
va_start(vl, fmt);
::vsnprintf(buffer + ::strlen(buffer), 500, fmt, vl);
::vsnprintf((buffer + ::strlen(buffer)), (500U - ::strlen(buffer)), fmt, vl);
va_end(vl);