Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
168aff53
Commit
168aff53
authored
May 15, 2002
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- check size to avoid realloc(0)
parent
dcd1ba26
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
55 deletions
+134
-55
src/input/input_dec.c
src/input/input_dec.c
+19
-7
src/input/input_programs.c
src/input/input_programs.c
+115
-48
No files found.
src/input/input_dec.c
View file @
168aff53
...
...
@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_dec.c,v 1.3
4 2002/05/14 21:23:44 massiot
Exp $
* $Id: input_dec.c,v 1.3
5 2002/05/15 15:46:34 asmax
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -224,17 +224,29 @@ static decoder_config_t * CreateDecoderConfig( input_thread_t * p_input,
/* Select a new ES */
p_input
->
stream
.
i_selected_es_number
++
;
p_input
->
stream
.
pp_selected_es
=
realloc
(
p_input
->
stream
.
pp_selected_es
,
p_input
->
stream
.
i_selected_es_number
*
sizeof
(
es_descriptor_t
*
)
);
if
(
p_input
->
stream
.
pp_selected_es
==
NULL
)
if
(
p_input
->
stream
.
i_selected_es_number
>
0
)
{
intf_ErrMsg
(
"Unable to realloc memory"
);
p_input
->
stream
.
pp_selected_es
=
realloc
(
p_input
->
stream
.
pp_selected_es
,
p_input
->
stream
.
i_selected_es_number
*
sizeof
(
es_descriptor_t
*
)
);
if
(
p_input
->
stream
.
pp_selected_es
==
NULL
)
{
intf_ErrMsg
(
"Unable to realloc memory"
);
free
(
p_config
->
p_decoder_fifo
);
free
(
p_config
);
return
NULL
;
}
}
else
{
intf_ErrMsg
(
"realloc(0) (p_input->stream.i_selected_es_number "
"corrupted?)"
);
free
(
p_config
->
p_decoder_fifo
);
free
(
p_config
);
return
NULL
;
}
p_input
->
stream
.
pp_selected_es
[
p_input
->
stream
.
i_selected_es_number
-
1
]
=
p_es
;
...
...
src/input/input_programs.c
View file @
168aff53
This diff is collapsed.
Click to expand it.
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