Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cab39afb
Commit
cab39afb
authored
Aug 10, 2014
by
Mark Reid
Committed by
Michael Niedermayer
Aug 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/movenc: check that reel_name length doesn't exceed UINT16_MAX
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bd879652
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
movenc.c
libavformat/movenc.c
+12
-3
No files found.
libavformat/movenc.c
View file @
cab39afb
...
@@ -1340,13 +1340,22 @@ static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack *track)
...
@@ -1340,13 +1340,22 @@ static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack *track)
return
update_size
(
pb
,
pos
);
return
update_size
(
pb
,
pos
);
}
}
static
int
mov_write_source_reference_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
,
const
char
*
reel_name
){
static
int
mov_write_source_reference_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
,
const
char
*
reel_name
)
{
uint64_t
str_size
=
strlen
(
reel_name
);
int64_t
pos
=
avio_tell
(
pb
);
int64_t
pos
=
avio_tell
(
pb
);
if
(
str_size
>=
UINT16_MAX
){
av_log
(
NULL
,
AV_LOG_ERROR
,
"reel_name length %llu is too large
\n
"
,
str_size
);
avio_wb16
(
pb
,
0
);
return
AVERROR
(
EINVAL
);
}
avio_wb32
(
pb
,
0
);
/* size */
avio_wb32
(
pb
,
0
);
/* size */
ffio_wfourcc
(
pb
,
"name"
);
/* Data format */
ffio_wfourcc
(
pb
,
"name"
);
/* Data format */
avio_wb16
(
pb
,
str
len
(
reel_name
));
/* string size */
avio_wb16
(
pb
,
str
_size
);
/* string size */
avio_wb16
(
pb
,
track
->
language
);
/* langcode */
avio_wb16
(
pb
,
track
->
language
);
/* langcode */
avio_write
(
pb
,
reel_name
,
str
len
(
reel_name
));
/* reel name */
avio_write
(
pb
,
reel_name
,
str
_size
);
/* reel name */
return
update_size
(
pb
,
pos
);
return
update_size
(
pb
,
pos
);
}
}
...
...
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