summaryrefslogtreecommitdiff
path: root/src/xkbatom.c
AgeCommit message (Collapse)Author
2023-10-08XkbChangeAtomDisplay: stop leaking atom nameAlan Coopersmith
Found by gcc 12 analyzer: xkbatom.c: In function ‘XkbChangeAtomDisplay’: xkbatom.c:218:16: warning: leak of ‘tmp’ [CWE-401] [-Wanalyzer-malloc-leak] xkbatom.c:220:12: warning: leak of ‘tmp’ [CWE-401] [-Wanalyzer-malloc-leak] 220 | return XInternAtom(dpy, name, onlyIfExists); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 5e5bd09 ("Fix offline operation.") Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-08_XkbInitAtoms: check for malloc() failureAlan Coopersmith
Handles gcc 12 analyzer warning: xkbatom.c: In function ‘_XkbInitAtoms’: xkbatom.c:194:21: warning: dereference of possibly-NULL ‘nodeTable’ [CWE-690] [-Wanalyzer-possible-null-dereference] 194 | nodeTable[None] = (NodePtr) NULL; | ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-08_XkbMakeAtom: remove check for impossible caseAlan Coopersmith
nd->string is always the result of a new allocation, so can never be equal to string. This resolves a warning from the gcc 12 analyzer, which reported a memory leak if the impossible condition was ever true: In file included from xkbatom.c:85: xkbatom.c: In function ‘_XkbMakeAtom’: XKBfileInt.h:51:33: warning: leak of ‘<unknown>’ [CWE-401] [-Wanalyzer-malloc-leak] [...] | 158 | if (!table) { | | ^ | | | | | (15) following ‘true’ branch (when ‘table’ is NULL)... | 159 | if (nd->string != string) | | ~~ ~ | | | | | | | (17) following ‘false’ branch... | | (16) ...to here | 161 | _XkbFree(nd); | | ^~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-29Use strndup if available to avoid -Wstringop-overflow warning from gcc 9Alan Coopersmith
Reported in https://gitlab.freedesktop.org/xorg/lib/libxkbfile/issues/5 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-10-28Constify atom name argument to XkbInternAtomAlan Coopersmith
Matches XInternAtom, which it wraps, and quiets a bunch of const warnings in xkbcomp. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ran Benita <ran234@gmail.com>
2013-10-20Convert to X.Org standard indentation styleAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-16Strip trailing whitespaceAlan Coopersmith
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>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2009-01-29Janitor: distcheck, compiler warnings, .gitignore.Paulo Cesar Pereira de Andrade
2006-04-12Fix offline operation.Daniel Stone
2005-06-13Add xkbfile to symlink.sh, conditionally include "config.h" inXORG-6_8_99_13XORG-6_8_99_12Søren Sandmann Pedersen
xc/lib/xkbfile
2004-04-23Merging XORG-CURRENT into trunksco_port_update-baserel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1XORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGEEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_903_specialxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16xf86-012804-2330Kaleb Keithley
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley