- Dec 30, 2024
-
-
Alan Coopersmith authored
It was made a static function in May 14, 1991 by rws in commit "make FirstCmp static" for X11R5 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!276>
-
- Feb 11, 2024
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Apr 22, 2020
-
-
Thomas E. Dickey authored
Signed-off-by:
Thomas E. Dickey <dickey@invisible-island.net>
-
- Dec 08, 2018
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Feb 06, 2016
-
-
Alan Coopersmith authored
instead of converting to int and back Fixes clang warnings of the form: HVC.c:190:43: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] if (strncmp(spec, _XcmsTekHVC_prefix, n) != 0) { ~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
Alan Coopersmith authored
Fixes gcc warnings of the form: IdOfPr.c: In function ‘XcmsFormatOfPrefix’: IdOfPr.c:69:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((len = strlen(prefix)) >= sizeof(string_buf)) { ^ IdOfPr.c:83:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ IdOfPr.c:97:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ IdOfPr.c:104:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len >= sizeof(string_buf)) Xfree(string_lowered); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Oct 25, 2013
-
-
Alan Coopersmith authored
The field2 helper function, to split lines from Xcms.txt files into two tab delimited fields, contained a check: if ((*pBuf != '\n') || (*pBuf != '\0')) { return(XcmsFailure); which would cause it to return failure unless *pBuf had a value that was simultaneously equal to both \n & \0, and no one wants to live in a world where that could ever be true. This has gone unnoticed since 1991, since this only caused lines in Xcms.txt that started with whitespace to be rejected, but now gcc -Wlogicalop has brought it to our attention, and https://bugs.freedesktop.org/show_bug.cgi?id=70803 was filed. Now that we see it, and cannot unsee it, we change it to use the same logic as the check at other points in this function, to return failure only if we hit \n or \0 before we find the first non-whitespace character, so that lines starting with whitespace will have the space skipped over to get to the color name to be defined. Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by:
Dan Nicholson <dbn.lists@gmail.com>
-
- Aug 20, 2013
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- May 10, 2013
-
-
Alan Coopersmith authored
Integer overflows in stringSectionSize() cause buffer overflow in ReadColornameDB() [CVE-2013-1981 6/13] LoadColornameDB() calls stringSectionSize() to do a first pass over the file (which may be provided by the user via XCMSDB environment variable) to determine how much memory needs to be allocated to read in the file, then allocates the returned sizes and calls ReadColornameDB() to load the data from the file into that newly allocated memory. If stringSectionSize() overflows the signed ints used to calculate the file size (say if you have an xcmsdb with ~4 billion lines in or a combined string length of ~4 gig - which while it may have been inconceivable when Xlib was written, is quite possible today), then LoadColornameDB() may allocate a memory buffer much smaller than the amount of data ReadColornameDB() will write to it. The total size is left limited to an int, because if your xcmsdb file is larger than 2gb, you're doing it wrong. Reported-by:
Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by:
Matthieu Herrb <matthieu.herrb@laas.fr>
-
- Feb 16, 2013
-
-
Alan Coopersmith authored
Fixes gcc warning: cmsColNm.c: In function 'FirstCmp': cmsColNm.c:257:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] cmsColNm.c:257:45: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Jan 03, 2013
-
-
Egbert Eich authored
The path to this file is configurable at build time. The source however contains a hard coded path. Signed-off-by:
Egbert Eich <eich@freedesktop.org> Reviewed-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Feb 02, 2011
-
-
Pointer "pBuf" returned from "fgets(buf, 256, stream)" is never used Reviewed-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by:
Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by:
Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Jan 15, 2010
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@sun.com>
-
- Jun 17, 2008
-
-
Alan Coopersmith authored
-
- Apr 26, 2008
-
-
Colin Harrison authored
-
- Apr 05, 2008
-
-
Bart Massey authored
-
- Apr 06, 2007
-
-
Tilman Sauerbeck authored
I didn't fix all of them, as that would require touching public headers.
-
- Jul 03, 2005
-
-
Daniel Stone authored
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
-
- May 13, 2005
-
-
Søren Sandmann Pedersen authored
- For Xcomposite and Xdamage, don't link the build system out of the xc tree - Link the public X11 headers into their own directory - Add links to XKeysymDB and XErrorDB - Add links to all the Xlib man pages - Add links to the lcUniConv subdirectory - Conditionally include config.h in Xlib source
-
- Apr 23, 2004
-
-
Egbert Eich authored
-
- Nov 14, 2003
-