From a1b0fdb2c9852c48ede8e3bc2a7049d707188fd1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 9 Aug 2013 23:02:12 -0700 Subject: xlibi18n: convert sprintf calls to snprintf Signed-off-by: Alan Coopersmith Reviewed-by: Matthieu Herrb Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/lcUTF8.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nx-X11/lib/X11/lcUTF8.c') diff --git a/nx-X11/lib/X11/lcUTF8.c b/nx-X11/lib/X11/lcUTF8.c index 3e934b713..84d87772f 100644 --- a/nx-X11/lib/X11/lcUTF8.c +++ b/nx-X11/lib/X11/lcUTF8.c @@ -1731,10 +1731,10 @@ create_tofontcs_conv( lazy_init_all_charsets(); for (i = 0, num = 0;; i++) { - sprintf(buf, "fs%d.charset.name", i); + snprintf(buf, sizeof(buf), "fs%d.charset.name", i); _XlcGetResource(lcd, "XLC_FONTSET", buf, &value, &count); if (count < 1) { - sprintf(buf, "fs%d.charset", i); + snprintf(buf, sizeof(buf), "fs%d.charset", i); _XlcGetResource(lcd, "XLC_FONTSET", buf, &value, &count); if (count < 1) break; @@ -1749,10 +1749,10 @@ create_tofontcs_conv( /* Loop through all fontsets mentioned in the locale. */ for (i = 0, num = 0;; i++) { - sprintf(buf, "fs%d.charset.name", i); + snprintf(buf, sizeof(buf), "fs%d.charset.name", i); _XlcGetResource(lcd, "XLC_FONTSET", buf, &value, &count); if (count < 1) { - sprintf(buf, "fs%d.charset", i); + snprintf(buf, sizeof(buf), "fs%d.charset", i); _XlcGetResource(lcd, "XLC_FONTSET", buf, &value, &count); if (count < 1) break; -- cgit v1.2.3