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
fca44948
Commit
fca44948
authored
Jun 12, 2009
by
JP Dinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a stack smash in the lua module (vlc.read).
parent
dc9d5568
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
modules/misc/lua/demux.c
modules/misc/lua/demux.c
+6
-2
No files found.
modules/misc/lua/demux.c
View file @
fca44948
...
...
@@ -28,6 +28,8 @@
# include "config.h"
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_demux.h>
#include <vlc_url.h>
...
...
@@ -72,10 +74,12 @@ static int vlclua_demux_peek( lua_State *L )
static
int
vlclua_demux_read
(
lua_State
*
L
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
vlclua_get_this
(
L
);
uint8_t
*
p_read
;
const
uint8_t
*
p_read
;
int
n
=
luaL_checkint
(
L
,
1
);
int
i_read
=
stream_
Read
(
p_demux
->
s
,
&
p_read
,
n
);
int
i_read
=
stream_
Peek
(
p_demux
->
s
,
&
p_read
,
n
);
lua_pushlstring
(
L
,
(
const
char
*
)
p_read
,
i_read
);
int
i_seek
=
stream_Read
(
p_demux
->
s
,
NULL
,
i_read
);
assert
(
i_read
==
i_seek
);
return
1
;
}
...
...
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