Fix a heap corruption in MIX_Init ( sizeof() != strlen() ).

This commit is contained in:
Rein Klazes 2004-09-02 22:57:39 +00:00 committed by Alexandre Julliard
parent 72d1eb475c
commit ad6b12c64c
1 changed files with 1 additions and 1 deletions

View File

@ -1445,7 +1445,7 @@ static DWORD MIX_Init(void)
mixer_info info;
if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) {
MIX_Mixers[i].name = HeapAlloc(GetProcessHeap(),0,strlen(info.name) + 1);
strncpy(MIX_Mixers[i].name, info.name, sizeof(info.name));
strcpy(MIX_Mixers[i].name, info.name);
} else {
/* FreeBSD up to at least 5.2 provides this ioctl, but does not
* implement it properly, and there are probably similar issues