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
8c88ea76
Commit
8c88ea76
authored
Apr 20, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/tiff: use av_malloc(z)_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1fd5c7f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tiff.c
libavcodec/tiff.c
+2
-2
No files found.
libavcodec/tiff.c
View file @
8c88ea76
...
@@ -838,7 +838,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
...
@@ -838,7 +838,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
s
->
geotag_count
=
0
;
s
->
geotag_count
=
0
;
return
-
1
;
return
-
1
;
}
}
s
->
geotags
=
av_mallocz
(
sizeof
(
TiffGeoTag
)
*
s
->
geotag_count
);
s
->
geotags
=
av_mallocz
_array
(
s
->
geotag_count
,
sizeof
(
TiffGeoTag
)
);
if
(
!
s
->
geotags
)
{
if
(
!
s
->
geotags
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error allocating temporary buffer
\n
"
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error allocating temporary buffer
\n
"
);
s
->
geotag_count
=
0
;
s
->
geotag_count
=
0
;
...
@@ -860,7 +860,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
...
@@ -860,7 +860,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
(
bytestream2_get_bytes_left
(
&
s
->
gb
)
<
count
*
sizeof
(
int64_t
))
if
(
bytestream2_get_bytes_left
(
&
s
->
gb
)
<
count
*
sizeof
(
int64_t
))
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
dp
=
av_malloc
(
count
*
sizeof
(
double
));
dp
=
av_malloc
_array
(
count
,
sizeof
(
double
));
if
(
!
dp
)
{
if
(
!
dp
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error allocating temporary buffer
\n
"
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error allocating temporary buffer
\n
"
);
goto
end
;
goto
end
;
...
...
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