Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
fa6b1937
Commit
fa6b1937
authored
Sep 27, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: fix overflow in cprt language decoding
refs #12283
parent
2ca41038
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+7
-12
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+2
-2
No files found.
modules/demux/mp4/libmp4.c
View file @
fa6b1937
...
...
@@ -2426,26 +2426,21 @@ static int MP4_ReadBox_elst( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_cprt
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
unsigned
int
i_language
;
uint16_t
i_language
;
bool
b_mac
;
MP4_READBOX_ENTER
(
MP4_Box_data_cprt_t
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_cprt
);
i_language
=
GetWBE
(
p_peek
);
for
(
unsigned
i
=
0
;
i
<
3
;
i
++
)
{
p_box
->
data
.
p_cprt
->
i_language
[
i
]
=
(
(
i_language
>>
(
(
2
-
i
)
*
5
)
)
&
0x1f
)
+
0x60
;
}
p_peek
+=
2
;
i_read
-=
2
;
MP4_GET2BYTES
(
i_language
);
decodeQtLanguageCode
(
i_language
,
p_box
->
data
.
p_cprt
->
rgs_language
,
&
b_mac
);
MP4_GETSTRINGZ
(
p_box
->
data
.
p_cprt
->
psz_notice
);
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
,
"read box:
\"
cprt
\"
language %c%c%c notice %s"
,
p_box
->
data
.
p_cprt
->
i_language
[
0
],
p_box
->
data
.
p_cprt
->
i_language
[
1
],
p_box
->
data
.
p_cprt
->
i_language
[
2
],
msg_Dbg
(
p_stream
,
"read box:
\"
cprt
\"
language %3.3s notice %s"
,
p_box
->
data
.
p_cprt
->
rgs_language
,
p_box
->
data
.
p_cprt
->
psz_notice
);
#endif
...
...
modules/demux/mp4/libmp4.h
View file @
fa6b1937
...
...
@@ -756,8 +756,8 @@ typedef struct MP4_Box_data_cprt_s
{
uint8_t
i_version
;
uint32_t
i_flags
;
/* 1 pad bit */
unsigned
char
i_language
[
3
];
char
rgs_language
[
3
];
/* ISO-639-2/T */
char
*
psz_notice
;
}
MP4_Box_data_cprt_t
;
...
...
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