1. 22 Jun, 2019 2 commits
    • Ulrich Sibiller's avatar
      xkb: fix what looks to be a copy-paste error with first vs firstMM · 5be6d271
      Ulrich Sibiller authored
        commit 758393951233d1b2520cf4cefd33ec4288a3880a
        Author: Dave Airlie <airlied@redhat.com>
        Date:   Wed Sep 12 11:09:40 2018 +1000
      
          xkb: fix what looks to be a copy-paste error with first vs firstMM
      
          Pointed out by coverity.
      Signed-off-by: 's avatarDave Airlie <airlied@redhat.com>
      5be6d271
    • Ulrich Sibiller's avatar
      XKB: Remove a bunch of mad ifdefs · 4962c5a8
      Ulrich Sibiller authored
        commit 534fc5140b039a8c98ab715d0a6740d513b41209
        Author: Daniel Stone <daniel@fooishbar.org>
        Date:   Sun Feb 3 23:30:22 2008 +1100
      
          XKB: Remove a bunch of mad ifdefs
      
          We have SEEK_SET and size_t, seriously.  Also use DebugF instead of
          ifdef DEBUG, and ditch a couple of random bits that were never used.
      4962c5a8
  2. 17 Dec, 2018 2 commits
  3. 09 Nov, 2018 3 commits
    • Ulrich Sibiller's avatar
      ProcXkbGetKbdByName: fix use of uninitialised bytes valgrind error. · 69475953
      Ulrich Sibiller authored
        We have fixed that (independendly) before, but missed one line.
      Backported-to-nx-by: 's avatarUlrich Sibiller <uli42@gmx.de>
      
          commit 85f9017393c9bb19553e9afcf554673a44a09993
          Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
          Date:   Tue Feb 8 11:10:10 2011 +0200
      
            ProcXkbGetXkbByName: fix use of uninitialised bytes valgrind error.
      
            ==9999== Syscall param writev(vector[...]) points to uninitialised byte(s)
            ==9999==    at 0x4AB5154: writev (writev.c:51)
            ==9999==    by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912)
            ==9999==    by 0x61C8B: FlushClient (io.c:924)
            ==9999==    by 0x62423: WriteToClient (io.c:846)
            ==9999==    by 0xCE39B: XkbSendMap (xkb.c:1408)
            ==9999==    by 0xD247B: ProcXkbGetKbdByName (xkb.c:5814)
            ==9999==    by 0x4AB53: Dispatch (dispatch.c:432)
            ==9999==    by 0x205BF: main (main.c:291)
            ==9999==  Address 0x557eb68 is 40 bytes inside a block of size 4,096 alloc'd
            ==9999==    at 0x48334A4: calloc (vg_replace_malloc.c:467)
            ==9999==    by 0x62567: WriteToClient (io.c:1065)
            ==9999==    by 0x452EB: ProcEstablishConnection (dispatch.c:3685)
            ==9999==    by 0x4AB53: Dispatch (dispatch.c:432)
            ==9999==    by 0x205BF: main (main.c:291)
            ==9999==  Uninitialised value was created by a stack allocation
            ==9999==    at 0xD1910: ProcXkbGetKbdByName (xkb.c:5559)
      Signed-off-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: 's avatarOliver McFadden <oliver.mcfadden@nokia.com>
      Signed-off-by: 's avatarAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
      69475953
    • Ulrich Sibiller's avatar
      XkbSendNames: fix use of uninitialised bytes valgrind error. · 018b2d0c
      Ulrich Sibiller authored
      Backported-to-nx-by: 's avatarUlrich Sibiller <uli42@gmx.de>
      
          commit 8a34d7a8532c7ca013e67307f3baf200167abb92
          Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
          Date:   Tue Feb 8 11:10:11 2011 +0200
      
            XkbSendNames: fix use of uninitialised bytes valgrind error.
      
            ==537== Syscall param writev(vector[...]) points to uninitialised byte(s)
            ==537==    at 0x4AB7154: writev (writev.c:51)
            ==537==    by 0x8935B: _XSERVTransWritev (Xtrans.c:912)
            ==537==    by 0x6C55F: FlushClient (io.c:924)
            ==537==    by 0x6CCF3: WriteToClient (io.c:846)
            ==537==    by 0xD51D3: XkbSendNames (xkb.c:3765)
            ==537==    by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825)
            ==537==    by 0x27B7B: Dispatch (dispatch.c:432)
            ==537==    by 0x205B7: main (main.c:291)
            ==537==  Address 0x55899f2 is 154 bytes inside a block of size 1,896 alloc'd
            ==537==    at 0x4834C48: malloc (vg_replace_malloc.c:236)
            ==537==    by 0xD47AF: XkbSendNames (xkb.c:3642)
            ==537==    by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825)
            ==537==    by 0x27B7B: Dispatch (dispatch.c:432)
            ==537==    by 0x205B7: main (main.c:291)
            ==537==  Uninitialised value was created by a heap allocation
            ==537==    at 0x4834C48: malloc (vg_replace_malloc.c:236)
            ==537==    by 0xD47AF: XkbSendNames (xkb.c:3642)
            ==537==    by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825)
            ==537==    by 0x27B7B: Dispatch (dispatch.c:432)
            ==537==    by 0x205B7: main (main.c:291)
      Signed-off-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: 's avatarOliver McFadden <oliver.mcfadden@nokia.com>
      Signed-off-by: 's avatarAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
      018b2d0c
    • Ulrich Sibiller's avatar
      Lift xkb to XORG-1.2.0 state · 9808c66e
      Ulrich Sibiller authored
      9808c66e
  4. 03 Jul, 2018 2 commits
    • Mike Gabriel's avatar
      Removal of dead code in Xserver/xkb. Follow-up commit for 3739a9b3. · e734ca21
      Mike Gabriel authored
       Spotted in and backported from X.org:
      
       commit 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d
       Author: Adam Jackson <ajax@benzedrine.nwnk.net>
       Date:   Sun Mar 18 16:31:19 2007 -0400
      
          Static markup and dead code cull over xkb/.
      
          The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
          include/xkbsrv.h, and the world updated to look for it in the new place,
          since it made no sense to define server API in an extension header.  Any
          further work along this line will need to do similar things with XKBgeom.h
          and friends.
      Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
      e734ca21
    • Ulrich Sibiller's avatar
      xkb/xkb.c: init all reply structs · cfcaa442
      Ulrich Sibiller authored
      and do it identically everywhere. As we are using C99 designated
      initializers here we remove the memset and bzero calls that had been
      used for this at some locations.
      cfcaa442
  5. 27 Feb, 2018 1 commit
    • Ulrich Sibiller's avatar
      Lift xkb to xorg-xserver-7.1/1.1.0 state · 9e6f87e2
      Ulrich Sibiller authored
      In XORG-7_1 xkbconfig.c had been dropped. We must keep this file
      because it is used by hw/nxagent/Keyboard.c to load the xkb
      configuration file. Maybe we should move the relevant code to there or
      drop xkb configuration file support from nxagent.
      9e6f87e2
  6. 27 Dec, 2017 1 commit
  7. 03 Mar, 2017 3 commits
    • Ulrich Sibiller's avatar
      replace (DE)ALLOCATE_LOCAL by malloc/free · 06bb154d
      Ulrich Sibiller authored
      This is basically a backport of the following commits + replacing
      xalloc/xfree by malloc/free. Fixes ArcticaProject/nx-libs#358.
      
         commit 2761c103311a1160bc483fd0367d654733df8598
         Author: Daniel Stone <daniel@fooishbar.org>
         Date:   Mon Nov 5 14:03:26 2007 +0000
      
             OS: Remove usage of alloca
      
             Replace with heap allocations.
      
         commit 5e363500c86042c394595e1a6633581eb8fcd1bb
         Author: Daniel Stone <daniel@fooishbar.org>
         Date:   Mon Nov 5 14:38:28 2007 +0000
      
             OS: Remove ALLOCATE_LOCAL from os.h
      
             Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and
             remove the include of Xalloca.h as well.
      06bb154d
    • Alan Coopersmith's avatar
      Replace _XkbDupString with Xstrdup · bdfb5219
      Alan Coopersmith authored
      The two functions have identical semantics, including safely returning
      NULL when NULL is passed in (which POSIX strdup does not guarantee).
      
      Some callers could probably be adjusted to call libc strdup directly,
      when we know the input is non-NULL.
      Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Signed-off-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: 's avatarDaniel Stone <daniel@fooishbar.org>
      Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
      bdfb5219
    • Ulrich Sibiller's avatar
      replace (DE)ALLOCATE_LOCAL by malloc/free · 09ef9991
      Ulrich Sibiller authored
      This is basically a backport of the following commits + replacing
      xalloc/xfree by malloc/free. Fixes ArcticaProject/nx-libs#358.
      
         commit 2761c103311a1160bc483fd0367d654733df8598
         Author: Daniel Stone <daniel@fooishbar.org>
         Date:   Mon Nov 5 14:03:26 2007 +0000
      
             OS: Remove usage of alloca
      
             Replace with heap allocations.
      
         commit 5e363500c86042c394595e1a6633581eb8fcd1bb
         Author: Daniel Stone <daniel@fooishbar.org>
         Date:   Mon Nov 5 14:38:28 2007 +0000
      
             OS: Remove ALLOCATE_LOCAL from os.h
      
             Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and
             remove the include of Xalloca.h as well.
      09ef9991
  8. 02 Mar, 2017 1 commit
  9. 20 Oct, 2016 1 commit
  10. 06 Oct, 2016 3 commits
  11. 05 Jul, 2016 4 commits
  12. 04 Jul, 2016 1 commit
    • Mike Gabriel's avatar
      Use internal temp variable for swap macros. Make swaps/swapl type safe… · 286d8326
      Mike Gabriel authored
      Use internal temp variable for swap macros. Make swaps/swapl type safe (introducing wrong_size check at build time).
      
       While working on this changeset, various spots got discovered where
       swapl or swaps was used on a wrong type, where byte swapping calls had
       been forgotten or done on the wrong variable.
      
       This backport at least includes changes from the following X.org
       commits, listed in non-chronological order:
      
       commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8
       Author: Matt Turner <mattst88@gmail.com>
       Date:   Thu Aug 4 15:35:41 2011 -0400
      
          Use internal temp variable for swap macros
      
          Also, fix whitespace, mainly around
              swaps(&rep.sequenceNumber)
      Reviewed-by: 's avatarPeter Harris <pharris@opentext.com>
      Signed-off-by: 's avatarMatt Turner <mattst88@gmail.com>
      
       commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01
       Author: Matt Turner <mattst88@gmail.com>
       Date:   Wed Sep 21 17:14:16 2011 -0400
      
          Use correct swap{l,s} (or none at all for CARD8)
      
          Swapping the wrong size was never caught because swap{l,s} are macros.
      
          It's clear in the case of Xext/xres.c, that the author believed
          client_major/minor to be CARD16 from looking at the code in the first
          hunk.
      
          v2: dmx.c fixes from Keith.
      Reviewed-by: 's avatarPeter Harris <pharris@opentext.com>
      Signed-off-by: 's avatarMatt Turner <mattst88@gmail.com>
      
       commit dab064fa5e0b1f5c67222562ad5367005832cba1
       Author: Andrea Canciani <ranma42@gmail.com>
       Date:   Tue Nov 2 20:10:32 2010 +0100
      
          render: Fix byteswapping of gradient stops
      
          The function swapStops repeatedly swaps the color components as
          CARD16, but incorrectly steps over them as if they were CARD32.
      
          This causes half of the stops not to be swapped at all and some
          unrelated data be swapped instead.
      Signed-off-by: 's avatarAndrea Canciani <ranma42@gmail.com>
      Reviewed-by: 's avatarSoren Sandmann <sandmann@daimi.au.dk>
      Reviewed-by: 's avatarJulien Cristau <jcristau@debian.org>
      Signed-off-by: 's avatarKeith Packard <keithp@keithp.com>
      
       commit 54770c980cd2b91a8377f975a58ed69def5cfa42
       Author: Matt Turner <mattst88@gmail.com>
       Date:   Tue Aug 16 16:59:07 2011 -0400
      
          Cast char* buffers to swap functions
      Reviewed-by: 's avatarPeter Harris <pharris@opentext.com>
      Signed-off-by: 's avatarMatt Turner <mattst88@gmail.com>
      
       commit 6844bd2e63490870bab3c469eec6030354ef2865
       Author: Alan Coopersmith <alan.coopersmith@sun.com>
       Date:   Wed Jan 9 19:52:00 2008 -0800
      
          More Xv extension byte swapping fixes
      
       commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83
       Author: Michel Dänzer <michel@tungstengraphics.com>
       Date:   Wed Jan 16 14:24:22 2008 +0100
      
          Yet another Xv extension byte swapping fix.
      286d8326
  13. 02 Jul, 2016 2 commits
  14. 28 Dec, 2015 2 commits
    • Mike Gabriel's avatar
      Clear header file namespace separation (<X11/...> vs. <nx-X11/...>). · 433d8186
      Mike Gabriel authored
       In the process of building nxagent against more and more system-wide installed
       X.org libraries, we come to the limit of including structs from this (bundled
       nx-X11) and that (system-wide X.Org) library.
      
       This commit introduces a clear namespace separation of headers provided by
       nx-X11 and headers provided by X.Org. This approach is only temporary as we
       want to drop all nx-X11 bundled libraries from nx-libs.
      
       However, for a while we need to make this separation clear and also ship
       some reduced fake X.Org headers that avoid pulling in libX* and libNX_X*
       symbols at the same time.
      
       This patch has been tested on Debian jessie and unstable and requires no
       overall testing on various distros and distro versions, as we finally will
       drop all libNX_X* libraries and build against X.org's client libs.
      
       For now, this hack eases our development / cleanup process.
      433d8186
    • Keith Packard's avatar
      Replace 'pointer' type with 'void *' · 68dd0b52
      Keith Packard authored
       This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
       is used throughout the X server for other things, and having duplicate
       names generates compiler warnings.
      Signed-off-by: 's avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: 's avatarEric Anholt <eric@anholt.net>
       Rebased against NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
      68dd0b52
  15. 01 Jul, 2015 1 commit
  16. 18 Feb, 2015 3 commits
  17. 10 Oct, 2011 1 commit