Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
58381851
Commit
58381851
authored
Feb 25, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Feb 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciavi32: Fix the buffer length passed into strncat in MCIAVI_mciSet.
The number of remaining characters should be passed in, not the total buffer size.
parent
45322bb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
info.c
dlls/mciavi32/info.c
+11
-11
No files found.
dlls/mciavi32/info.c
View file @
58381851
...
...
@@ -230,22 +230,22 @@ DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
strcpy
(
buffer
,
"MCI_SET_ON:"
);
if
(
dwFlags
&
MCI_SET_VIDEO
)
{
strncat
(
buffer
,
" video"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" video"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_ON:"
)
);
wma
->
dwSet
|=
4
;
}
if
(
dwFlags
&
MCI_SET_AUDIO
)
{
strncat
(
buffer
,
" audio"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" audio"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_ON:"
)
);
switch
(
lpParms
->
dwAudio
)
{
case
MCI_SET_AUDIO_ALL
:
strncat
(
buffer
,
" all"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" all"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_ON:"
)
);
wma
->
dwSet
|=
3
;
break
;
case
MCI_SET_AUDIO_LEFT
:
strncat
(
buffer
,
" left"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" left"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_ON:"
)
);
wma
->
dwSet
|=
1
;
break
;
case
MCI_SET_AUDIO_RIGHT
:
strncat
(
buffer
,
" right"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" right"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_ON:"
)
);
wma
->
dwSet
|=
2
;
break
;
default:
...
...
@@ -264,22 +264,22 @@ DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
strcpy
(
buffer
,
"MCI_SET_OFF:"
);
if
(
dwFlags
&
MCI_SET_VIDEO
)
{
strncat
(
buffer
,
" video"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" video"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_OFF:"
)
);
wma
->
dwSet
&=
~
4
;
}
if
(
dwFlags
&
MCI_SET_AUDIO
)
{
strncat
(
buffer
,
" audio"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" audio"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_OFF:"
)
);
switch
(
lpParms
->
dwAudio
)
{
case
MCI_SET_AUDIO_ALL
:
strncat
(
buffer
,
" all"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" all"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_OFF:"
)
);
wma
->
dwSet
&=
~
3
;
break
;
case
MCI_SET_AUDIO_LEFT
:
strncat
(
buffer
,
" left"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" left"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_OFF:"
)
);
wma
->
dwSet
&=
~
2
;
break
;
case
MCI_SET_AUDIO_RIGHT
:
strncat
(
buffer
,
" right"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" right"
,
sizeof
(
buffer
)
-
sizeof
(
"MCI_SET_OFF:"
)
);
wma
->
dwSet
&=
~
2
;
break
;
default:
...
...
@@ -288,7 +288,7 @@ DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms)
}
}
if
(
dwFlags
&
MCI_DGV_SET_SEEK_EXACTLY
)
{
strncat
(
buffer
,
" seek_exactly"
,
sizeof
(
buffer
));
strncat
(
buffer
,
" seek_exactly"
,
sizeof
(
buffer
)
-
strlen
(
buffer
)
-
1
);
}
FIXME
(
"%s
\n
"
,
buffer
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment