Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
c833e5a7
Commit
c833e5a7
authored
May 19, 2013
by
Michael Krufky
Committed by
Jean-Paul Saman
Feb 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dr_a1: check the descriptor length before allocating p_decoded
Signed-off-by:
Michael Krufky
<
mkrufky@linuxtv.org
>
parent
6f8a84a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/descriptors/dr_a1.c
src/descriptors/dr_a1.c
+4
-7
No files found.
src/descriptors/dr_a1.c
View file @
c833e5a7
...
...
@@ -59,6 +59,10 @@ dvbpsi_service_location_dr_t * dvbpsi_DecodeServiceLocationDr(
if
(
p_descriptor
->
p_decoded
)
return
p_descriptor
->
p_decoded
;
/* Check length */
if
((
p_descriptor
->
i_length
-
3
)
%
6
)
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_service_location_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_service_location_dr_t
));
...
...
@@ -66,13 +70,6 @@ dvbpsi_service_location_dr_t * dvbpsi_DecodeServiceLocationDr(
memset
(
p_decoded
,
0
,
sizeof
(
dvbpsi_service_location_dr_t
));
/* Decode data and check the length */
if
(
p_descriptor
->
i_length
<
3
)
{
free
(
p_decoded
);
return
NULL
;
}
p_descriptor
->
p_decoded
=
(
void
*
)
p_decoded
;
p_decoded
->
i_pcr_pid
=
dvbpsi_get_bits
(
buf
,
3
,
13
);
...
...
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