Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libImaging/BcnEncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@

UINT8 *dst = buf;

int will_write = (n == 2 || n == 3 || n == 5) ? 16 : 8;

Check warning on line 260 in src/libImaging/BcnEncode.c

View check run for this annotation

Codecov / codecov/patch

src/libImaging/BcnEncode.c#L260

Added line #L260 was not covered by tests
for (;;) {
// Loop writes a max of 16 bytes per iteration
if (dst + 16 >= bytes + buf) {
if (dst + will_write >= bytes + buf) {
break;
}
if (n == 5) {
Expand Down
Loading