From 809b9e4f4a2719e26ecf4b51105adfd9a5fc40a8 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 14 Jul 2026 15:46:18 +0300 Subject: [PATCH] utils: read_from_stdin: avoid reading nuls We should read the actual written size, not the allocated size. --- lib/utils/mu-utils-file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/mu-utils-file.cc b/lib/utils/mu-utils-file.cc index b2b341b6..735fe2c3 100644 --- a/lib/utils/mu-utils-file.cc +++ b/lib/utils/mu-utils-file.cc @@ -190,7 +190,7 @@ Mu::read_from_stdin() return Ok(std::string{ static_cast(g_memory_output_stream_get_data( G_MEMORY_OUTPUT_STREAM(outmem))), - g_memory_output_stream_get_size(G_MEMORY_OUTPUT_STREAM(outmem))}); + g_memory_output_stream_get_data_size(G_MEMORY_OUTPUT_STREAM(outmem))}); } /* LCOV_EXCL_STOP*/