| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'add' command leads to a segmentation fault on invalid input.
Two arguments to 'add' can be quoted, but the quotation check does not
properly parse a single double quote:
$ echo 'add 0 " 0 0 0' | iceauth
Segmentation fault
$ _
This happens because the code does not properly check if the argument
consists of just one quote. Technically, it is true that the first
and the last characters are double quotes. Therefore it also takes a
check to verify that the length of the string is at least 2.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Started by fixing gcc warning:
iceauth.c:47:1: warning: initialization discards ‘const’ qualifier from
pointer target type [enabled by default]
static char *defcmds[] = { "source", "-", NULL }; /* default command */
^
and chasing down the rabbit hole of the functions the command line
arguments can be passed through, until we came out the other side
const clean.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
| |
Found by cppcheck:
[app/iceauth/process.c:302]: (error) Common realloc mistake:
'argv' nulled but not freed upon failure
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>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quiets clang warnings of:
process.c:754:29: warning: cast from 'char *' to 'struct _list_data *'
increases required alignment from 1 to 8 [-Wcast-align]
struct _list_data *ld = (struct _list_data *) data;
^~~~~~~~~~~~~~~~~~~~~~~~~~
process.c:787:32: warning: cast from 'char *' to 'struct _extract_data *'
increases required alignment from 1 to 8 [-Wcast-align]
struct _extract_data *ed = (struct _extract_data *) data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
process.c:988:22: warning: cast from 'char *' to 'int *'
increases required alignment from 1 to 4 [-Wcast-align]
int *nremovedp = (int *) data;
^~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
process.c:410:22: warning: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
retval = malloc (len);
~~~~~~ ^~~
process.c:454:30: warning: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
strncmp (cmd, ct->name, n) == 0) {
~~~~~~~ ^
process.c:450:9: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
n = strlen (cmd);
~ ^~~~~~~~~~~~
process.c:1028:34: warning: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
if (strncmp (cmd, ct->name, len) == 0) {
~~~~~~~ ^~~
process.c:1026:12: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
int len = strlen (cmd);
~~~ ^~~~~~~~~~~~
process.c:1560:8: warning: implicit conversion loses integer precision:
'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
len = strlen (buf);
~ ^~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
| |
Drops use of autoconf's obsolete AC_TYPE_SIGNAL and Imake's even more
obsolete SIGNALRETURNSINT.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
On some file systems (like AFP), hard links are not supported. If
link fails, try rename() before giving up.
Reported-by: Jamie Kennea <jamie@pompey.org>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
|
| |
Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
| |
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
| |
(611) warning: assignment of 64-bit integer to 32-bit integer
(653) warning: variable argument to strcpy(); make sure it's safe
(728) warning: sign extension from 32-bit to 64-bit integer
|
|
|
|
|
|
|
|
|
| |
X.Org Bugzilla #10739 <http://bugs.freedesktop.org/show_bug.cgi?id=10739>
Adding a test for NULL filename before calling IceUnlockAuthFile in
auth_finalize cleared the crash, but left the lock file behind.
Moving the initialization of authfilename to earlier in auth_initialize()
allowed the locks to be cleaned up as well.
|
|
|
|
|
| |
Also solves Coverity #924: Function copystring:
Pointer "src" dereferenced before NULL check
|
|
|
|
|
| |
Double free of pointer "(auth)->auth_data" in call to "free"
Double free of pointer "(auth)->protocol_data" in call to "free"
|
| |
|
|
|
|
|
|
| |
autoconf in addition to Imake's SIGNALRETURNSINT. Use
HAVE_WORKING_VFORK if defined by autoconf in addition to Imake's
HAS_VFORK
|
|
|
|
| |
4496504)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|