|
1 | 1 | // Copyright (C)2004 Landmark Graphics Corporation |
2 | 2 | // Copyright (C)2005, 2006 Sun Microsystems, Inc. |
3 | | -// Copyright (C)2009, 2011, 2014, 2019 D. R. Commander |
| 3 | +// Copyright (C)2009, 2011, 2014, 2019, 2025 D. R. Commander |
4 | 4 | // |
5 | 5 | // This library is free software and may be redistributed and/or modified under |
6 | 6 | // the terms of the wxWindows Library License, Version 3.1 or (at your option) |
@@ -71,7 +71,7 @@ void ClientWin::initGL(void) |
71 | 71 | { |
72 | 72 | GLFrame *newfb = NULL; |
73 | 73 | char dpystr[80]; |
74 | | - sprintf(dpystr, ":%d.0", dpynum); |
| 74 | + snprintf(dpystr, 80, ":%d.0", dpynum); |
75 | 75 | CriticalSection::SafeLock l(mutex); |
76 | 76 |
|
77 | 77 | if(drawMethod == RR_DRAWOGL) |
@@ -108,7 +108,7 @@ void ClientWin::initX11(void) |
108 | 108 | { |
109 | 109 | FBXFrame *newfb = NULL; |
110 | 110 | char dpystr[80]; |
111 | | - sprintf(dpystr, ":%d.0", dpynum); |
| 111 | + snprintf(dpystr, 80, ":%d.0", dpynum); |
112 | 112 | CriticalSection::SafeLock l(mutex); |
113 | 113 |
|
114 | 114 | if(drawMethod == RR_DRAWX11) |
@@ -154,7 +154,7 @@ Frame *ClientWin::getFrame(bool useXV) |
154 | 154 | if(!xvframes[cfindex]) |
155 | 155 | { |
156 | 156 | char dpystr[80]; |
157 | | - sprintf(dpystr, ":%d.0", dpynum); |
| 157 | + snprintf(dpystr, 80, ":%d.0", dpynum); |
158 | 158 | NEWCHECK(xvframes[cfindex] = new XVFrame(dpystr, window)); |
159 | 159 | if(!xvframes[cfindex]) THROW("Could not allocate class instance"); |
160 | 160 | } |
|
0 commit comments