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
c20edafa
Commit
c20edafa
authored
Mar 20, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dr_76: add boundary check
parent
3e838936
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
src/descriptors/dr_76.c
src/descriptors/dr_76.c
+3
-1
src/descriptors/dr_76.h
src/descriptors/dr_76.h
+10
-3
No files found.
src/descriptors/dr_76.c
View file @
c20edafa
...
...
@@ -64,7 +64,9 @@ dvbpsi_content_id_dr_t *dvbpsi_DecodeContentIdDr(dvbpsi_descriptor_t *p_descript
return
NULL
;
p_decoded
->
i_number_of_entries
=
0
;
for
(
byte
=
0
;
byte
<
p_descriptor
->
i_length
;
p_decoded
->
i_number_of_entries
++
)
for
(
byte
=
0
;
(
byte
<
p_descriptor
->
i_length
)
&&
(
p_decoded
->
i_number_of_entries
<
DVBPSI_CRID_ENTRY_DR_MAX
);
p_decoded
->
i_number_of_entries
++
)
{
dvbpsi_crid_entry_t
*
entry
=
&
p_decoded
->
p_entries
[
p_decoded
->
i_number_of_entries
];
...
...
src/descriptors/dr_76.h
View file @
c20edafa
...
...
@@ -84,7 +84,14 @@ typedef struct dvbpsi_crid_entry_s
uint8_t
path
[
253
];
/*!< content path */
uint16_t
ref
;
/*!< content reference */
}
value
;
/*!< content specific value */
}
dvbpsi_crid_entry_t
;
}
dvbpsi_crid_entry_t
;
/*!
* \def DVBPSI_CRID_ENTRY_DR_MAX
* \brief Maximum number of dvbpsi_crid_entry_t entries present in
* @see dvbpsi_content_id_dr_t
*/
#define DVBPSI_CRID_ENTRY_DR_MAX 85
/*****************************************************************************
* dvbpsi_content_id_dr_s
...
...
@@ -102,8 +109,8 @@ typedef struct dvbpsi_crid_entry_s
typedef
struct
dvbpsi_content_id_dr_s
{
uint8_t
i_number_of_entries
;
/*!< Number of CRID entries present. */
dvbpsi_crid_entry_t
p_entries
[
85
];
/*!< Array of CRID entries. */
}
dvbpsi_content_id_dr_t
;
dvbpsi_crid_entry_t
p_entries
[
DVBPSI_CRID_ENTRY_DR_MAX
];
/*!< Array of CRID entries. */
}
dvbpsi_content_id_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeLCNDr
...
...
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