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
9d72c052
Commit
9d72c052
authored
Apr 18, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nutdec: add malloc check and fix const to non-const conversion warnings
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
0f53601a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
nutdec.c
libavformat/nutdec.c
+6
-2
No files found.
libavformat/nutdec.c
View file @
9d72c052
...
...
@@ -305,14 +305,18 @@ static int decode_main_header(NUTContext *nut)
GET_V
(
nut
->
header_count
,
tmp
<
128U
)
nut
->
header_count
++
;
for
(
i
=
1
;
i
<
nut
->
header_count
;
i
++
)
{
uint8_t
*
hdr
;
GET_V
(
nut
->
header_len
[
i
],
tmp
>
0
&&
tmp
<
256
);
rem
-=
nut
->
header_len
[
i
];
if
(
rem
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"invalid elision header
\n
"
);
return
AVERROR_INVALIDDATA
;
}
nut
->
header
[
i
]
=
av_malloc
(
nut
->
header_len
[
i
]);
avio_read
(
bc
,
nut
->
header
[
i
],
nut
->
header_len
[
i
]);
hdr
=
av_malloc
(
nut
->
header_len
[
i
]);
if
(
!
hdr
)
return
AVERROR
(
ENOMEM
);
avio_read
(
bc
,
hdr
,
nut
->
header_len
[
i
]);
nut
->
header
[
i
]
=
hdr
;
}
assert
(
nut
->
header_len
[
0
]
==
0
);
}
...
...
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