summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
7 daysWriteToClient: handle allocation failureHEADmasterAlan Coopersmith1-1/+3
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>
7 daysSetFontCatalogue: handle allocation failureAlan Coopersmith1-0/+2
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>
7 daysQueryBitmaps: Avoid memory leak in error pathAlan Coopersmith1-1/+3
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>
7 daysQueryExtents: Avoid memory leak in error pathAlan Coopersmith1-1/+3
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>
7 daysAdd alloc_size & malloc attributes to allocation functionsAlan Coopersmith1-5/+30
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>
7 daysMark FatalError as _X_NORETURNAlan Coopersmith1-1/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysprint error messages if syslog support is built but disabledAlan Coopersmith1-8/+10
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>
7 daysGet rid of fsalloc/fsrealloc/fsfree wrapper macrosAlan Coopersmith13-179/+175
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysAdd FSreallocarray for array reallocation with overflow checkAlan Coopersmith5-10/+26
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysReplace obsolete bzero call with standard memset callAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysReplace alloc+bzero pairs with FScalloc callsAlan Coopersmith4-15/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysMake FScalloc take two args like standard callocAlan Coopersmith3-5/+5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysAdd FSallocarray for array allocation with overflow checkAlan Coopersmith10-21/+34
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysAvoid memory leak if -ls specified multiple times on command lineAlan Coopersmith1-0/+4
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>
7 daysRemove no-op OsInitAllocator()Alan Coopersmith3-8/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysDetachStdio: check that open & dup2 functions succeedAlan Coopersmith1-3/+15
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>
7 daysRemove unused EventSwap functions & dispatch vectorAlan Coopersmith4-26/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/app/xfs/-/merge_requests/7>
7 daysRemove unused empty NoopDDA() functionAlan Coopersmith2-6/+0
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>
7 daysClear up -Wcast-function-type warnings from NotImplemented()Alan Coopersmith6-26/+35
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>
2024-02-17unifdef SUNSSYVAlan Coopersmith1-3/+0
This isn't defined on Solaris, so I don't know what this was for Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-17unifdef QNX4Alan Coopersmith1-2/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-13gitlab CI: Update to latest CI templates & Debian stable releaseAlan Coopersmith1-3/+9
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>
2023-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith2-2/+2
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-10xfs 1.2.1xfs-1.2.1Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-16gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-16Use memcpy() instead of memmove() when buffers are known not to overlapAlan Coopersmith6-19/+19
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>
2022-04-16SetAlternateServers(): avoid memory leak on allocation failureAlan Coopersmith1-5/+10
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>
2022-01-09Fix spelling/wording issuesAlan Coopersmith7-9/+9
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-06Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-06gitlab CI: add a basic build testAlan Coopersmith1-0/+99
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-16Update README for gitlab migrationAlan Coopersmith2-21/+15
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-10doc/xfs-design.xml: Remove obsolete B16 tags in struct definitionAlan Coopersmith1-6/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-11-28xfs 1.2.0xfs-1.2.0Adam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-11-06xfs: port to libXfont2Adam Jackson15-92/+252
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>
2017-04-24xtrans: Simplify an error path when started from inetdAdam Jackson1-4/+1
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>
2017-01-26autogen: add default patch prefixMihail Konev1-0/+3
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov1-4/+4
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>
2017-01-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer1-1/+1
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>
2015-07-23Include config.h first, and add comment about Xpoll.h.Thomas Klausner2-2/+4
(To avoid having this header moved lower.) Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-19Ignore .dirstamp files.Thomas Klausner1-0/+1
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-07-19FD_SETSIZE fixes.Matthew Green2-2/+3
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>
2015-06-08Fix memory leaks when not using allocaAlan Coopersmith1-0/+8
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>
2014-08-23Add const to port variable passed to TRANS(ReopenCOTSServer)Alan Coopersmith1-1/+1
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>
2014-08-21xfs 1.1.4xfs-1.1.4Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-08-11Add subdir-objects to automake optionsAlan Coopersmith1-1/+1
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>
2014-08-10Fix CFLAGS and LDFLAGS for Cygwin/MinGWYaakov Selkowitz1-0/+6
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>
2014-06-02autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith1-2/+3
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-02configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-23Add -version option to print program versionAlan Coopersmith2-2/+15
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>