From 230a1dc356266afb206c98e47ee72e8fca0948e2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 22 Jun 2013 10:56:53 -0700 Subject: Replace sprintf with snprintf when looking up extension error strings Signed-off-by: Alan Coopersmith --- include/X11/extensions/extutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/X11/extensions/extutil.h b/include/X11/extensions/extutil.h index 29404d5..b228430 100644 --- a/include/X11/extensions/extutil.h +++ b/include/X11/extensions/extutil.h @@ -178,7 +178,7 @@ char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \ code -= codes->first_error; \ if (code >= 0 && code < nerr) { \ char tmp[256]; \ - sprintf (tmp, "%s.%d", extname, code); \ + snprintf (tmp, sizeof(tmp), "%s.%d", extname, code); \ XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \ return buf; \ } \ -- cgit v1.2.1