From: Jehan Date: Sat, 11 Feb 2023 15:53:42 +0000 (+0100) Subject: bin: fix size of dest memory. X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=28c3992fa5eaeb3ab2eb8f20548bd20213e4f6e0;p=babl.git bin: fix size of dest memory. I guess I was lucky I never got a crash for out-of-bound memory access. --- diff --git a/bin/babl.c b/bin/babl.c index 964a357..4e1a6dc 100644 --- a/bin/babl.c +++ b/bin/babl.c @@ -210,7 +210,7 @@ main (int argc, data_index = 0; to_format = babl_format_with_space (to, to_space); - dest = malloc (babl_format_get_bytes_per_pixel (from_format)); + dest = malloc (babl_format_get_bytes_per_pixel (to_format)); /* Re-looping through arguments, to be more flexible with argument orders. * In this second loop, we get the source components' values.