Sorry, we'll update.
We got a crash report with ZBarcode_Encode crashing with a stack overflow. Maybe you fixed it already in a newer version, but I would recommend to check against ZINT_MAX_DATA_LEN. I added such a check to the function for our copy of the source code. There is no reason why it should accept 2 MB.
Version was Zint 2.9.2
ZBarcode_Encode crashes if passed too much data
Looks like you didn't fix it for multi frame images. Or did I misunderstand the code? if (comments) { (void) SetImageAttribute(image,"comment",NULL); (void) SetImageAttribute(image,"comment",comments); } this block is on the bottom. But this must go up to where the image is read. The key thing is that we have a GIF with 8 frames. Each frame has a comment. So we have 8 comments and 8 images and I think we need to read each image comment. since not each image has a comment, you also need to set comments...
Thank you. That was quick!
To fix this, I made comments a variable before the loop: char *comments = (char *) NULL; then when reading the comment, we just store it: comments=comments_new; later when we read the GIF frame, we add the comment: if (comments) { (void) SetImageAttribute(image,"comment",comments); MagickFreeResourceLimitedMemory(comments); comments = NULL; } and on the end, we need to free comments, if it is still there if (comments) { (void) SetImageAttribute(image,"comment",comments); MagickFreeResourceLimitedMemory(comments);...
Reading multiple GIFs doesn't read the comments correctly.