From 272e57235cd60a2e65ac8258d96a02eb3939b687 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 25 Mar 2011 10:41:05 +0000 Subject: git update until 25 Mar 2011 xserver fontconfig glproto libXau libXft libXmu libfontenc libxcb mesa mkfontscale pixman randrproto xkeyboard-config xtrans xwininfo updated following packages: xproto-7.0.21 xineramaproto-1.2.1 libXt-1.1.1 libxkbfile-1.0.7 libXpm-3.5.9 libXfont-1.4.3 libXaw-1.0.9 bdftopcf-1.0.3 encodings-1.0.4 fixesproto-5.0 font-adobe-100dpi-1.0.3 font-adobe-75dpi-1.0.3 font-adobe-utopia-100dpi-1.0.4 font-adobe-utopia-75dpi-1.0.4 font-adobe-utopia-type1-1.0.4 font-alias-1.0.3 font-arabic-misc-1.0.3 font-bh-100dpi-1.0.3 font-bh-75dpi-1.0.3 font-bh-lucidatypewriter-100dpi-1.0.3 font-bh-lucidatypewriter-75dpi-1.0.3 font-bh-ttf-1.0.3 font-bh-type1-1.0.3 font-bitstream-100dpi-1.0.3 font-bitstream-75dpi-1.0.3 font-bitstream-speedo-1.0.2 font-bitstream-type1-1.0.3 font-cronyx-cyrillic-1.0.3 font-cursor-misc-1.0.3 font-daewoo-misc-1.0.3 font-dec-misc-1.0.3 font-ibm-type1-1.0.3 font-isas-misc-1.0.3 font-jis-misc-1.0.3 font-micro-misc-1.0.3 font-misc-cyrillic-1.0.3 font-misc-ethiopic-1.0.3 font-misc-meltho-1.0.3 font-misc-misc-1.1.2 font-mutt-misc-1.0.3 font-schumacher-misc-1.1.2 font-screen-cyrillic-1.0.4 font-sony-misc-1.0.3 font-sun-misc-1.0.3 font-util-1.2.0 font-winitzki-cyrillic-1.0.3 font-xfree86-type1-1.0.4 --- libXmu/src/StrToCurs.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'libXmu/src/StrToCurs.c') diff --git a/libXmu/src/StrToCurs.c b/libXmu/src/StrToCurs.c index 7f13c0d4e..4d72f80cb 100644 --- a/libXmu/src/StrToCurs.c +++ b/libXmu/src/StrToCurs.c @@ -1,5 +1,3 @@ -/* $Xorg: StrToCurs.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ - /* Copyright 1987, 1988, 1998 The Open Group @@ -50,8 +48,6 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.11 2002/09/19 13:21:58 tsi Exp $ */ - #ifdef HAVE_CONFIG_H #include #endif @@ -159,25 +155,29 @@ XmuCvtStringToCursor(XrmValuePtr args, Cardinal *num_args, if (0 == strncmp(FONTSPECIFIER, name, strlen(FONTSPECIFIER))) { char source_name[PATH_MAX], mask_name[PATH_MAX]; - int source_char, mask_char, fields; + int source_char, mask_char, fields = 0; Font source_font, mask_font; XrmValue fromString, toFont; XrmValue cvtArg; Boolean success; Display *dpy = DisplayOfScreen(screen); - char *strspec = NULL; + char *strspec = NULL; + int strspeclen; #ifdef XMU_KLUDGE Cardinal num; #endif - strspec = XtMalloc(strlen("FONT %s %d %s %d") + 21); - sprintf(strspec, "FONT %%%lds %%d %%%lds %%d", - (unsigned long)sizeof(source_name) - 1, - (unsigned long)sizeof(mask_name) - 1); - fields = sscanf(name, strspec, - source_name, &source_char, - mask_name, &mask_char); - XtFree(strspec); + strspeclen = strlen("FONT %s %d %s %d") + 21; + strspec = XtMalloc(strspeclen); + if (strspec != NULL) { + snprintf(strspec, strspeclen, "FONT %%%lds %%d %%%lds %%d", + (unsigned long)sizeof(source_name) - 1, + (unsigned long)sizeof(mask_name) - 1); + fields = sscanf(name, strspec, + source_name, &source_char, + mask_name, &mask_char); + XtFree(strspec); + } if (fields < 2) { XtStringConversionWarning(name, XtRCursor); return; -- cgit v1.2.3