From 9323f41c73060acba351bdf263f88f9542d1d360 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 25 Jun 2024 19:30:16 +0200 Subject: [PATCH] stb_image_write: rewrite sprintf as snprintf --- crnlib/stb_image_write.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crnlib/stb_image_write.h b/crnlib/stb_image_write.h index fc4a344f..f9c7bb63 100644 --- a/crnlib/stb_image_write.h +++ b/crnlib/stb_image_write.h @@ -773,7 +773,7 @@ static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, f #ifdef __STDC_LIB_EXT1__ len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); #else - len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); + len = snprintf(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); #endif s->func(s->context, buffer, len);