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
5475749d
Commit
5475749d
authored
Jan 23, 2011
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua_xml: fix read of non-initialized pointers.
parent
2a7cdd59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
modules/misc/lua/libs/xml.c
modules/misc/lua/libs/xml.c
+12
-2
No files found.
modules/misc/lua/libs/xml.c
View file @
5475749d
...
...
@@ -128,7 +128,14 @@ static int vlclua_xml_reader_next_node( lua_State *L )
{
xml_reader_t
*
p_reader
=
*
(
xml_reader_t
**
)
luaL_checkudata
(
L
,
1
,
"xml_reader"
);
const
char
*
psz_name
;
lua_pushinteger
(
L
,
xml_ReaderNextNode
(
p_reader
,
&
psz_name
)
);
int
i_type
=
xml_ReaderNextNode
(
p_reader
,
&
psz_name
);
if
(
i_type
<=
0
)
{
lua_pushinteger
(
L
,
0
);
return
1
;
}
lua_pushinteger
(
L
,
i_type
);
lua_pushstring
(
L
,
psz_name
);
return
2
;
}
...
...
@@ -137,8 +144,11 @@ static int vlclua_xml_reader_next_attr( lua_State *L )
{
xml_reader_t
*
p_reader
=
*
(
xml_reader_t
**
)
luaL_checkudata
(
L
,
1
,
"xml_reader"
);
const
char
*
psz_value
;
const
char
*
psz_name
=
xml_ReaderNextAttr
(
p_reader
,
&
psz_value
);
if
(
!
psz_name
)
return
0
;
lua_pushstring
(
L
,
xml_ReaderNextAttr
(
p_reader
,
&
psz_value
)
);
lua_pushstring
(
L
,
psz_name
);
lua_pushstring
(
L
,
psz_value
);
return
2
;
}
...
...
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