From 28c3992fa5eaeb3ab2eb8f20548bd20213e4f6e0 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 11 Feb 2023 16:53:42 +0100 Subject: [PATCH] bin: fix size of dest memory. I guess I was lucky I never got a crash for out-of-bound memory access. --- bin/babl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.30.2