From 2ffd4e4f1af16b17a286ff354603a717f5d828a5 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:12:18 +0200 Subject: Replace all calls to sprintf() by calls to snprintf(). --- examples/OpenGL3test.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/OpenGL3test.cxx b/examples/OpenGL3test.cxx index 26ee1b816..9de83b5bd 100644 --- a/examples/OpenGL3test.cxx +++ b/examples/OpenGL3test.cxx @@ -68,7 +68,7 @@ public: gl_Position = vec4(p, 0.0, 0.0) + position;\ }"; char vss_string[300]; const char *vss = vss_string; - sprintf(vss_string, vss_format, Mslv, mslv); + snprintf(vss_string, 300, vss_format, Mslv, mslv); const char *fss_format="#version %d%d\n\ in vec4 colourV;\ out vec4 fragColour;\ @@ -77,7 +77,7 @@ public: fragColour = colourV;\ }"; char fss_string[200]; const char *fss = fss_string; - sprintf(fss_string, fss_format, Mslv, mslv); + snprintf(fss_string, 200, fss_format, Mslv, mslv); GLint err; GLchar CLOG[1000]; GLsizei length; vs = glCreateShader(GL_VERTEX_SHADER); glShaderSource(vs, 1, &vss, NULL); -- cgit v1.2.3