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
e71dce57
Commit
e71dce57
authored
Mar 09, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/siff: Fix checks and variable types
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8f92c089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
siff.c
libavformat/siff.c
+4
-3
No files found.
libavformat/siff.c
View file @
e71dce57
...
...
@@ -56,7 +56,7 @@ typedef struct SIFFContext {
int
curstrm
;
unsigned
int
pktsize
;
int
gmcsize
;
int
sndsize
;
unsigned
int
sndsize
;
unsigned
int
flags
;
uint8_t
gmc
[
4
];
...
...
@@ -208,10 +208,11 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
}
if
(
!
c
->
curstrm
)
{
if
(
c
->
pktsize
<
2LL
+
c
->
sndsize
+
c
->
gmcsize
)
return
AVERROR_INVALIDDATA
;
size
=
c
->
pktsize
-
c
->
sndsize
-
c
->
gmcsize
-
2
;
size
=
ffio_limit
(
s
->
pb
,
size
);
if
(
size
<
0
||
c
->
pktsize
<
c
->
sndsize
)
return
AVERROR_INVALIDDATA
;
if
(
av_new_packet
(
pkt
,
size
+
c
->
gmcsize
+
2
)
<
0
)
return
AVERROR
(
ENOMEM
);
AV_WL16
(
pkt
->
data
,
c
->
flags
);
...
...
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