projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use X_LIBS from pkg-config, instead of libdir, for locating libX11
[mesa.git]
/
progs
/
xdemos
/
sharedtex_mt.c
diff --git
a/progs/xdemos/sharedtex_mt.c
b/progs/xdemos/sharedtex_mt.c
index f924448cc436444b520bf3f52297b314f53a69d3..a90903adeca7e098ffa8daf510d78aa97f766d2d 100644
(file)
--- a/
progs/xdemos/sharedtex_mt.c
+++ b/
progs/xdemos/sharedtex_mt.c
@@
-174,6
+174,10
@@
AddWindow(Display *dpy, const char *displayName, int xpos, int ypos,
{
static int id = 0;
struct window *h = &Windows[NumWindows];
+ if (strlen(displayName) + 1 > sizeof(h->DisplayName)) {
+ Error(displayName, "string overflow");
+ return NULL;
+ }
strcpy(h->DisplayName, displayName);
h->Dpy = dpy;
h->Win = win;