This commit is contained in:
Andrew Murray 2025-07-08 18:21:02 +10:00 committed by GitHub
commit b5df869d24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,9 +257,9 @@ ImagingBcnEncode(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes) {
UINT8 *dst = buf; UINT8 *dst = buf;
int will_write = (n == 2 || n == 3 || n == 5) ? 16 : 8;
for (;;) { for (;;) {
// Loop writes a max of 16 bytes per iteration if (dst + will_write >= bytes + buf) {
if (dst + 16 >= bytes + buf) {
break; break;
} }
if (n == 5) { if (n == 5) {