From c0c6d33475e401e23c7aa6c0c8bf8223156fe1f6 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Fri, 14 Aug 2026 13:30:43 -0700 Subject: [PATCH] fix(oiiotool): minor safety fix for error message marshalling It's not safe to pass a string as the sole argument to Strutil::format. When it's ok, it's just a no-op, so remove the format call and just assign to errmsg. Signed-off-by: Larry Gritz --- src/oiiotool/oiiotool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oiiotool/oiiotool.cpp b/src/oiiotool/oiiotool.cpp index 14b695c61f..64b2d9504e 100644 --- a/src/oiiotool/oiiotool.cpp +++ b/src/oiiotool/oiiotool.cpp @@ -5666,7 +5666,7 @@ input_file(Oiiotool& ot, cspan argv) // Try to get a more precise error message to report. auto in = ImageInput::open(filename); std::string err = in ? in->geterror() : OIIO::geterror(); - errmsg = Strutil::format(ot.format_read_error(filename, err)); + errmsg = ot.format_read_error(filename, err); } // Second chances: do we have a substitute image policy? ImageSpec substitute_spec;