From 62ad0418b444f93498821f8e3974952d3ab535ff Mon Sep 17 00:00:00 2001 From: Eric Pouech <Eric.Pouech@wanadoo.fr> Date: Sat, 26 Jun 1999 10:30:11 +0000 Subject: [PATCH] Fixed null ptr deref introduced in last patch. --- multimedia/mcistring.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/multimedia/mcistring.c b/multimedia/mcistring.c index 3b352d63d92..b5af30e5404 100644 --- a/multimedia/mcistring.c +++ b/multimedia/mcistring.c @@ -2554,11 +2554,13 @@ DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrReturnString, } *dev++ = '\0'; args = strchr(dev, ' '); - if (args != NULL) *args = '\0'; - while (*++args == ' '); if (args != NULL) { char *s; + + *args = '\0'; + while (*++args == ' '); + i = 1;/* nrofkeywords = nrofspaces+1 */ s = args; while ((s = strchr(s, ' ')) != NULL) { -- GitLab