blob limit for every single picture
bootsplash_file.h
, line 100:
uint8_t num_blobs;
num_blobs for single image header can't be more than 255, so theme can contain unused blobs because there's no blob count check for every single picture:
bootsplash-packer.c
, line 368:
/* Set blob counts */
for (blob_cur = blob_first; blob_cur; blob_cur = blob_cur->next) {
if (blob_cur->header.picture_id < fh.num_pics)
ph[blob_cur->header.picture_id].num_blobs++;
}
I can set 450 for first image and 75 for second and the file will look like this:
—- File header —-
version: 55561
bg_red: 0
bg_green: 0
bg_blue: 0
bg_reserved: 0
num_blobs: 525
num_pics: 2
frame_ms: 40
—- Picture header —-
width: 200
height: 200
num_blobs: 194
position: 03x
position_offset: 0
anim_type: 1
anim_loop: 0
—- Picture header —-
width: 48
height: 48
num_blobs: 75
position: 53x
position_offset: 250
anim_type: 1
anim_loop: 0
525 != 194 + 75
This causes https://gitlab.manjaro.org/manjaro-arm/packages/extra/bootsplash-viewer/ to break
Edited by Andrey Alekseev