BLF_buffer was trying to accept "how many colors channels in output image?" argument and doing math with it, but in the lowest level code was always writing out full 4 channels for each pixel. All the call sites would ever call it with argument of 4 however, and that is why no one noticed the issue. Pull Request: https://projects.blender.org/blender/blender/pulls/121630