mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[MMIXER] Fix overzealous asserts. CORE-16611
MAXPNAMELEN is the size of the array, so if wcslen returns MAXPNAMELEN-1, the null terminator fits and everything is okay.
This commit is contained in:
@@ -72,7 +72,7 @@ MMixerAddMidiPin(
|
||||
MidiInfo->PinId = PinId;
|
||||
|
||||
/* sanity check */
|
||||
ASSERT(!DeviceName || (wcslen(DeviceName) + 1 < MAXPNAMELEN));
|
||||
ASSERT(!DeviceName || (wcslen(DeviceName) < MAXPNAMELEN));
|
||||
|
||||
/* copy device name */
|
||||
if (bInput && DeviceName)
|
||||
|
||||
@@ -357,7 +357,7 @@ MMixerInitializeWaveInfo(
|
||||
WaveInfo->PinId = Pins[0];
|
||||
|
||||
/* sanity check */
|
||||
ASSERT(wcslen(DeviceName) + 1 < MAXPNAMELEN);
|
||||
ASSERT(wcslen(DeviceName) < MAXPNAMELEN);
|
||||
|
||||
/* copy device name */
|
||||
if (bWaveIn)
|
||||
|
||||
Reference in New Issue
Block a user