From ad6b12c64c5ee91a5a5133f85e17d806933b191d Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Thu, 2 Sep 2004 22:57:39 +0000 Subject: [PATCH] Fix a heap corruption in MIX_Init ( sizeof() != strlen() ). --- dlls/winmm/wineoss/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winmm/wineoss/mixer.c b/dlls/winmm/wineoss/mixer.c index ddbffce5aba..1eb53af37d9 100644 --- a/dlls/winmm/wineoss/mixer.c +++ b/dlls/winmm/wineoss/mixer.c @@ -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