Age | Commit message (Collapse) | Author |
|
Found by cppcheck 1.62:
[src/register.c:84]: (style) Variable 'name' is assigned a value
that is never used.
[src/register.c:182]: (style) Variable 'name' is assigned a value
that is never used.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by cppcheck 1.62:
[src/accept.c:113]: (error) Memory leak: iceConn.connection_string
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
arc4random() and associated functions can be found in libbsd on
GNU/Linux systems.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Clears a number of clang warnings of the form:
connect.c:328:6: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'CARD16' (aka 'unsigned short')
[-Wconversion]
STORE_STRING (pData, _IceAuthNames[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./ICElibint.h:173:19: note: expanded from macro 'STORE_STRING'
CARD16 _len = strlen (_string); \
~~~~ ^~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Remove leftover remnants of CRAY support, which still had some
functions consisting solely of /* NOT IMPLEMENTED YET */ comments.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Needed to fix const string warnings in iceauth - functions already
copy provided arguments to temporary local buffer for modifications.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Error: Memory leak (CWE 401)
Memory leak of pointer 'release' allocated with malloc((_len + 1))
at line 1100 of src/process.c in function 'ProcessConnectionSetup'.
'release' allocated at line 920 with malloc((_len + 1)).
release leaks when _i >= hisAuthCount at line 925
and i >= _IceAuthCount at line 973
and found != 0 at line 998
and status != 0 at line 1053
and status != 1 at line 1070
and accept_setup_now == 0 at line 1082
and i >= hisAuthCount at line 1093.
Memory leak of pointer 'vendor' allocated with malloc((_len + 1))
at line 1100 of src/process.c in function 'ProcessConnectionSetup'.
'vendor' allocated at line 919 with malloc((_len + 1)).
vendor leaks when _i >= hisAuthCount at line 925
and i >= _IceAuthCount at line 973
and found != 0 at line 998
and status != 0 at line 1053
and status != 1 at line 1070
and accept_setup_now == 0 at line 1082
and i >= hisAuthCount at line 1093.
[ This bug was found by the Parfait 0.3.7 bug checking tool.
For more information see http://labs.oracle.com/projects/parfait/ ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Needed to resolve gcc -Wwrite-strings warnings in callers.
These functions only pass the strings to strcmp before calling
strdup to make their own private copy for storing away.
While fixing the API docs to match, also fix them to match the existing
function prototypes, where there were several errors before (including
just plain missing most of the args to IceRegisterForProtocolReply).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: walter <wharms@bfs.de>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Needed to clear gcc -Wwrite-strings warnings in callers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Had to split char *str into two variables, const char *str for the
string literals just being passed to fprintf etal. and char *estr
for use by EXTRACT_STRING for the results of malloc calls that get
written to and then freed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Error: Buffer overrun
Read outside array bounds (CWE 125): In call to memcpy(<unknown>, &mOp, 8), (size(&mOp) < (unsigned) 8)
Array size is 1 bytes
at line 296 of src/error.c in function '_IceErrorMajorOpcodeDuplicate'.
Error: Buffer overrun
Read outside array bounds (CWE 125): In call to memcpy(<unknown>, &maj, 8), (size(&maj) < (unsigned) 8)
Array size is 1 bytes
at line 346 of src/error.c in function '_IceErrorBadMajor'.
[ This bug was found by the Parfait 0.3.7 bug checking tool.
For more information see http://labs.oracle.com/projects/parfait/ ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Simplify configuration by using a single PKG_CHECK_MODULES statement.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Fixes issues found during xrdb review on xorg-devel
Also make sure <stdarg.h> is #included for varargs macros
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Includes simple local implemenation of asprintf if configure doesn't
find one in system libraries
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
cause us to include installed rather than packaged headers.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This prevents xsm from leaking file descriptors to the processes it
starts.
X.Org bug#22932 <http://bugs.freedesktop.org/show_bug.cgi?id=22932>
Reported-by: Kalle Olavi Niemitalo <kon@iki.fi>
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Also reorders some code in configure.ac and Makefile.am to
match pattern used on other packages.
|
|
suggested by Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
http://lists.freedesktop.org/archives/xorg/2008-December/041222.html
|
|
From Magnus Kessler <Magnus.Kessler@gmx.net>
http://lists.freedesktop.org/archives/xorg/2008-October/039799.html
http://lists.freedesktop.org/archives/xorg/attachments/20081030/b2ea5b1c/attachment-0001.bin
|
|
convert all old style function declarations
see also: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
http://bugs.freedesktop.org/show_bug.cgi?id=14683
http://bugs.freedesktop.org/attachment.cgi?id=14582
see also: Magnus Kessler <Magnus.Kessler@gmx.net>
http://lists.freedesktop.org/archives/xorg/2008-October/039799.html
http://lists.freedesktop.org/archives/xorg/attachments/20081030/b2ea5b1c/attachment-0001.bin
|
|
make _IceProcessCoreMessage and default error handlers static
|
|
|
|
This patch avoids the gcc (3.4.6) warnings:
../../libSM-1.0.3/src/sm_client.c:104: warning: passing arg 7 of `IceRegisterForProtocolSetup' from incompatible pointer type
../../libSM-1.0.3/src/sm_manager.c:168: warning: passing arg 7 of `IceRegisterForProtocolReply' from incompatible pointer type
when compiling libSM
|
|
X.Org Bug #17947 <http://bugs.freedesktop.org/show_bug.cgi?id=17947>
Patch #19444 <http://bugs.freedesktop.org/attachment.cgi?id=19444>
Define as 1 (one) as done by autoconf and the command line
option, e.g. -DICE_t, not as empty.
This avoids the gcc (3.4.6) warnings:
../../libICE-1.0.4/src/icetrans.c:29:1: warning: "ICE_t" redefined
../config.h:38:1: warning: this is the location of the previous definition
../../libICE-1.0.4/src/icetrans.c:30:1: warning: "TRANS_CLIENT" redefined
<command line>:6:1: warning: this is the location of the previous definition
../../libICE-1.0.4/src/icetrans.c:31:1: warning: "TRANS_SERVER" redefined
<command line>:7:1: warning: this is the location of the previous definition
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Same bug, different function.
|
|
If malloc failed in the loop in IceListenForConnections, the error path
would free all previous allocations, then loop around and try again, and
if it failed again, free the previous allocations again. On the other
hand, if it succeeded on the later tries, then the memory would just be
leaked, since the error would be returned and not the pointer to them.
|