Age | Commit message (Collapse) | Author | Files | Lines |
|
os/io.c: In function ‘write_to_client_internal’:
os/io.c:562:5: warning: use of possibly-NULL ‘buf’ where non-null expected
[CWE-690] [-Wanalyzer-possible-null-argument]
562 | memmove( (char *) oco->buf + oco->count, buf, count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
difs/fonts.c: In function ‘SetFontCatalogue’:
difs/fonts.c:766:14: warning: dereference of possibly-NULL ‘p’ [CWE-690]
[-Wanalyzer-possible-null-dereference]
766 | *p++ = len = end - str;
| ~~~~~^~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
difs/fontinfo.c: In function ‘QueryBitmaps’:
difs/fontinfo.c:430:8: warning: leak of ‘fixed_range’ [CWE-401] [-Wanalyzer-malloc-leak]
430 | if (!c)
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
difs/fontinfo.c: In function ‘QueryExtents’:
difs/fontinfo.c:331:8: warning: leak of ‘fixed_range’ [CWE-401]
[-Wanalyzer-malloc-leak]
331 | if (!c)
| ^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
All functions get alloc_size, but only fresh allocators get the
malloc attribute - it doesn't support realloc style functions.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Also ensure we always call va_end() before returning
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Reported by gcc 13.2 -fanalyze:
os/utils.c:237:15: warning: leak of ‘OldListen’ [CWE-401]
[-Wanalyzer-malloc-leak]
237 | OldListen = (OldListenRec *) malloc (
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | OldListenCount * sizeof (OldListenRec));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
This was originally an attempt to fix -Wanalyzer-fd-use-without-check
warnings from gcc 13.2 with -fanalyzer, but it still gives false positives
reported to gcc in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113329
and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114880 .
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
Was previously there just to work around broken linkers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
difs/dispatch.c: In function ‘InitProcVectors’:
difs/dispatch.c:1078:34: warning: cast between incompatible function types
from ‘int (*)(void)’ to ‘void (*)(struct _Client *, int, void *)’
[-Wcast-function-type]
1078 | ReplySwapVector[i] = (ReplySwapFunc)NotImplemented;
| ^
difs/dispatch.c:1082:30: warning: cast between incompatible function types
from ‘int (*)(void)’ to ‘void (*)(fsError *, fsError *)’
[-Wcast-function-type]
1082 | EventSwapVector[i] = (EventSwapFunc)NotImplemented;
| ^
(plus 10 more repeated warnings for difs/tables.c)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
|
|
This isn't defined on Solaris, so I don't know what this was for
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Current template fails to rebuild the CI container with the current
Debian stable release (a new release since the last update)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Oracle no longer includes this term in our copyright & license notices.
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>
|
|
Most of these came from a mass bcopy() -> memmove() substitution
in 1993 with a commit comment of "ANSIfied for R6".
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reported by Oracle Parfait static analyzer:
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer alts allocated with FSalloc((16 * num))
at line 229 of app/xfs/os/osglue.c in function 'SetAlternateServers'.
malloc called at line 372 of app/xfs/os/utils.c in function 'FSalloc'
Allocated value returned to caller at line 373
alts allocated at line 218 of app/xfs/os/osglue.c in function 'SetAlternateServers' with FSalloc((16 * num))
alts leaks when (*t) == 44 at line 225.
Memory leak [memory-leak] (CWE 401):
Memory leak of pointer alts allocated with FSalloc((16 * num))
at line 245 of app/xfs/os/osglue.c in function 'SetAlternateServers'.
malloc called at line 372 of app/xfs/os/utils.c in function 'FSalloc'
Allocated value returned to caller at line 373
alts allocated at line 218 of app/xfs/os/osglue.c in function 'SetAlternateServers' with FSalloc((16 * num))
alts leaks when (*(list + <pointer arithmetic>)) == 0 at line 224.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
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: Adam Jackson <ajax@redhat.com>
|
|
This appears to work, in the sense that xfsinfo and fslsfonts print the
same thing before and after.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
The old code is redundant, since our caller looks like:
OldListen = _FontTransGetInetdListenInfo (inetdListener);
if (OldListen == NULL) {
FatalError("failed to initialize OldListen to inetd socket: %s\n",
strerror(errno));
}
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
|
|
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
fall-outs, when they contain space.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Syncs the invocation of configure with the one from the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
(To avoid having this header moved lower.)
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Move X11/Xpoll.h include earlier than sys/select.h to avoid missing
out on setting FD_SETSIZE early enough.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reported by Oracle Parfait 1.5.1:
Error: Memory leak (CWE 401)
Memory leak of pointer client_auth allocated with FSalloc((prefix->num_auths * 24))
at line 256 of difs/dispatch.c in function 'ProcEstablishConnection'.
client_auth allocated at line 243 with FSalloc((prefix->num_auths * 24)).
client_auth leaks when (((Atom)ad) - ((Atom)(prefix + 8))) > ((stuff->length << 2) - 4) at line 252.
malloc called at line 372 of os/utils.c in function 'FSalloc'
at line 276 of difs/dispatch.c in function 'ProcEstablishConnection'.
client_auth allocated at line 243 with FSalloc((prefix->num_auths * 24)).
client_auth leaks when (i + 1) >= ((fsConnClientPrefix*)client->requestBuffer)[1].num_auths at line 251.
malloc called at line 372 of os/utils.c in function 'FSalloc'
Error: Memory leak (CWE 401)
Memory leak of pointer acp allocated with FSalloc((stuff->num_auths * 24))
at line 604 of difs/dispatch.c in function 'ProcCreateAC'.
acp allocated at line 590 with FSalloc((stuff->num_auths * 24)).
acp leaks when ((((Atom)ad) - ((Atom)client->requestBuffer)) + 8) > ((stuff->length << 2) - 4) at line 599.
malloc called at line 372 of os/utils.c in function 'FSalloc'
at line 622 of difs/dispatch.c in function 'ProcCreateAC'.
acp allocated at line 590 with FSalloc((stuff->num_auths * 24)).
acp leaks when (i + 1) >= ((fsCreateACReq*)client->requestBuffer)->num_auths at line 597.
malloc called at line 372 of os/utils.c in function 'FSalloc'
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Before this patch, gcc always warns:
os/xfstrans.c: In function ‘_FontTransGetInetdListenInfo’:
os/xfstrans.c:38:18: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
char *port = "0";
^
After this patch, with prior versons of libxtrans, gcc will warn about
passing a const to TRANS(ReopenCOTSServer) where non-const is expected.
With both this patch & the libxtrans const patches, there are no warnings.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
automake 1.14.1 is asking for it:
warning: possible forward-incompatibility.
At least a source file is in a subdirectory, but the 'subdir-objects'
automake option hasn't been enabled. For now, the corresponding output
object file(s) will be placed in the top-level directory. However,
this behaviour will change in future Automake versions: they will
unconditionally cause object files to be placed in the same subdirectory
of the corresponding sources.
You are advised to start using 'subdir-objects' option throughout your
project, to avoid future incompatibilities.
and repeating for every source file:
Makefile.am:35: warning: source file 'difs/charinfo.c' is in a subdirectory,
Makefile.am:35: but option 'subdir-objects' is disabled
This quiets it, and brings us into line with the future state.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
As in xserver, FD_SETSIZE must be overridden due to a too-low default,
and symbols must be exported for compatibility with the shared libXfont
stub handling on these platforms.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
See http://people.gnome.org/~walters/docs/build-api.txt
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>
|