Fix a bunch of code scanning warnings

This commit is contained in:
Kovid Goyal
2020-07-07 09:52:59 +05:30
parent ee47a10b37
commit 521f921424
6 changed files with 8 additions and 8 deletions

View File

@@ -77,7 +77,7 @@ inflate_png_inner(png_read_data *d, const uint8_t *buf, size_t bufsz) {
png_read_update_info(png, info);
int rowbytes = png_get_rowbytes(png, info);
d->sz = rowbytes * d->height * sizeof(png_byte);
d->sz = sizeof(png_byte) * rowbytes * d->height;
d->decompressed = malloc(d->sz + 16);
if (d->decompressed == NULL) ABRT(ENOMEM, "Out of memory allocating decompression buffer for PNG");
d->row_pointers = malloc(d->height * sizeof(png_bytep));