mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Merge pull request #332 from Clownacy/dev
Fix invalid vsnprintf buffer size
This commit is contained in:
+1
-1
@@ -8752,7 +8752,7 @@ MA_API ma_result ma_log_postv(ma_log* pLog, ma_uint32 level, const char* pFormat
|
|||||||
return MA_OUT_OF_MEMORY;
|
return MA_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
length = vsnprintf(pFormattedMessageHeap, sizeof(pFormattedMessageHeap), pFormat, args);
|
length = vsnprintf(pFormattedMessageHeap, length + 1, pFormat, args);
|
||||||
if (length < 0) {
|
if (length < 0) {
|
||||||
ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks);
|
ma_free(pFormattedMessageHeap, &pLog->allocationCallbacks);
|
||||||
return MA_INVALID_OPERATION;
|
return MA_INVALID_OPERATION;
|
||||||
|
|||||||
Reference in New Issue
Block a user