process_pipeline: Set the thumbnail row buffer to correct size

Otherwise it's saving 2*image->width bytes of uninitialized memory
image->height times into the DNG file.
This commit is contained in:
Sebastian Krzyszkowiak 2021-06-02 04:37:55 +02:00 committed by Martijn Braam
parent 4ca703d9cc
commit 52cc52437e
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ process_image_for_capture(const uint8_t *image, int count)
// Write black thumbnail, only windows uses this
{
unsigned char *buf =
(unsigned char *)calloc(1, (int)mode.width >> 4);
(unsigned char *)calloc(1, (mode.width >> 4) * 3);
for (int row = 0; row < (mode.height >> 4); row++) {
TIFFWriteScanline(tif, buf, row, 0);
}