/* At this point, the current file offset should match the one recorded
* above. */
- if (uo->pkg->version >= 63 && end_offset != (f->base + f->offset))
+ if (uo->pkg->version >= 63 && end_offset != (f->base + f->offset)) {
+ u_err(uo, "mipmap end offset does not match data size");
goto err_free;
+ }
/* Read in the remaining fields */
buflen = upkg_export_read(f, buf, 10);
for (int i = 0; i < self->_priv->mipmap_count; i++) {
data[i] = decode_mipmap(uo);
if (!data[i]) {
+ u_err(uo, "error decoding mipmap level %d", i);
+
/* Unwind the allocations. */
for (; i >= 0; i--)
free(data[i]);