Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
3065549c
Commit
3065549c
authored
Mar 22, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- mozilla: possible heap corruption when parsing options as string
parent
1d8b6ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+8
-7
No files found.
mozilla/control/npolibvlc.cpp
View file @
3065549c
...
...
@@ -1650,11 +1650,12 @@ RuntimeNPObject::InvokeResult LibvlcPlaylistNPObject::invoke(int index, const NP
return
INVOKERESULT_GENERIC_ERROR
;
}
void
LibvlcPlaylistNPObject
::
parseOptions
(
const
NPString
&
s
,
int
*
i_options
,
char
***
ppsz_options
)
void
LibvlcPlaylistNPObject
::
parseOptions
(
const
NPString
&
np
s
,
int
*
i_options
,
char
***
ppsz_options
)
{
if
(
s
.
utf8length
)
if
(
np
s
.
utf8length
)
{
char
*
val
=
stringValue
(
s
);
char
*
s
=
stringValue
(
nps
);
char
*
val
=
s
;
if
(
val
)
{
long
capacity
=
16
;
...
...
@@ -1663,7 +1664,7 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &s, int *i_options, cha
{
int
nOptions
=
0
;
char
*
end
=
val
+
s
.
utf8length
;
char
*
end
=
val
+
np
s
.
utf8length
;
while
(
val
<
end
)
{
// skip leading blanks
...
...
@@ -1694,11 +1695,11 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &s, int *i_options, cha
if
(
!
moreOptions
)
{
/* failed to allocate more memory */
delete
val
;
delete
s
;
/* return what we got so far */
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
break
;
return
;
}
options
=
moreOptions
;
}
...
...
@@ -1712,7 +1713,7 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &s, int *i_options, cha
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
}
delete
val
;
delete
s
;
}
}
}
...
...
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