mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
anim_util: quiet implicit conv warnings in 32-bit
the sizes are already validated by CheckSizeForOverflow(), add casts to
size_t to avoid -Wshorten-64-to-32
Change-Id: Ida9102c2104f4a334a0ad16d6e01a12bedfd4eec
(cherry picked from commit 1e2e25b0d4
)
This commit is contained in:
parent
d9120271e7
commit
aa7744ca38
@ -55,8 +55,8 @@ static int AllocateFrames(AnimatedImage* const image, uint32_t num_frames) {
|
|||||||
!CheckSizeForOverflow(total_frame_size)) {
|
!CheckSizeForOverflow(total_frame_size)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
mem = (uint8_t*)malloc(total_size);
|
mem = (uint8_t*)malloc((size_t)total_size);
|
||||||
frames = (DecodedFrame*)malloc(total_frame_size);
|
frames = (DecodedFrame*)malloc((size_t)total_frame_size);
|
||||||
|
|
||||||
if (mem == NULL || frames == NULL) {
|
if (mem == NULL || frames == NULL) {
|
||||||
free(mem);
|
free(mem);
|
||||||
|
Loading…
Reference in New Issue
Block a user