mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Have example/gifplayer use calloc
This commit is contained in:
1 parent
b781617159
commit
9373749b07
1 file changed
+1
-2
@@ -226,7 +226,7 @@ const char* try_allocate(wuffs_gif__decoder* dec) {
|
||||
}
|
||||
|
||||
dst_len = num_pixels * sizeof(wuffs_base__color_u32_argb_premul);
|
||||
curr_dst_buffer = (uint8_t*)malloc(dst_len);
|
||||
curr_dst_buffer = (uint8_t*)calloc(dst_len, 1);
|
||||
if (!curr_dst_buffer) {
|
||||
return "could not allocate curr-dst buffer";
|
||||
}
|
||||
@@ -320,7 +320,6 @@ const char* play() {
|
||||
if (!wuffs_base__status__is_ok(&status)) {
|
||||
return wuffs_base__status__message(&status);
|
||||
}
|
||||
memset(curr_dst_buffer, 0, dst_len);
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
||||
Reference in new issue
Block a user