Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6b72c1b0
Commit
6b72c1b0
authored
Mar 21, 2009
by
Rémi Denis-Courmont
Committed by
Rémi Denis-Courmont
Mar 31, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dshow: remove dangerous alloca, fix charset and and invalid free
Invalid free pointed out by xxcv.
parent
1be9f953
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+2
-9
No files found.
modules/access/dshow/dshow.cpp
View file @
6b72c1b0
...
...
@@ -40,6 +40,7 @@
#include <vlc_demux.h>
#include <vlc_vout.h>
#include <vlc_dialog.h>
#include <vlc_charset.h>
#include "common.h"
#include "filter.h"
...
...
@@ -1205,16 +1206,8 @@ FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
p_bag
->
Release
();
if
(
SUCCEEDED
(
hr
)
)
{
int
i_convert
=
WideCharToMultiByte
(
CP_ACP
,
0
,
var
.
bstrVal
,
SysStringLen
(
var
.
bstrVal
),
NULL
,
0
,
NULL
,
NULL
);
char
*
p_buf
=
(
char
*
)
alloca
(
i_convert
+
1
);
p_buf
[
0
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
var
.
bstrVal
,
SysStringLen
(
var
.
bstrVal
),
p_buf
,
i_convert
,
NULL
,
NULL
);
SysFreeString
(
var
.
bstrVal
);
p_buf
[
i_convert
]
=
'\0'
;
char
*
p_buf
=
FromWide
(
var
.
bstrVal
);
string
devname
=
string
(
p_buf
);
free
(
p_buf
)
;
int
dup
=
0
;
...
...
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