Please attach patches in unified diff format where possible.  I have
extracted the changes described in comment #3 on this bug into a diff
locally, and applied them to the version of tighvnc source in Ubuntu
15.04 (version 1.3.10-0ubuntu1).  After applying these changes,
Xtightvnc still fails with the same error as before:

$ tightvncserver :1
*** Error in `Xtightvnc': free(): invalid next size (fast): 0x00000100231b5170 
***
Couldn't start Xtightvnc; trying default font path.
Please set correct fontPath in the tightvncserver script.
*** Error in `Xtightvnc': free(): invalid next size (fast): 0x00000100041e8240 
***
Couldn't start Xtightvnc process.
[...]

So it doesn't appear that this is a complete fix for a 64-bit build.

The changes to Xvnc/programs/Xserver/dix/pixmap.c don't look correct to
me, either.  Relevant type declarations:

typedef struct _Pixmap {
    DrawableRec         drawable;
    int                 refcnt;
    int                 devKind;
    DevUnion            devPrivate;
#ifdef PIXPRIV
    DevUnion            *devPrivates; /* real devPrivates like gcs & windows */
#endif
} PixmapRec;

(Xvnc/programs/Xserver/include/pixmapstr.h)

typedef struct _Pixmap *PixmapPtr;

(Xvnc/programs/Xserver/include/pixmap.h)

Relevant block of code (after patching):

    PixmapPtr pPixmap;
#ifdef PIXPRIV
[...]
    DevUnion *ppriv;
[...]

    pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize + 
sizeof(DevUnion));
    if (!pPixmap)
        return NullPixmap;
    ppriv = (DevUnion *)(pPixmap + 1);
    pPixmap->devPrivates = ppriv;

So pPixmap is supposed to be a pointer to an object of type struct
_Pixmap; but it doesn't allocate it as a multiple of sizeof(struct
_Pixmap), so what ensures that the further references aren't walking off
the end of the allocated memory?  In practice, it looks like the answer
may be "nothing".

Has this patch been submitted to upstream?  As it doesn't fix the bug
when applied against 1.3.10, it would be good to see a fix accepted
upstream before we try to patch this in Ubuntu.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1341829

Title:
  Cannot start vncserver in PPC Ubuntu 14.04 LE

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tightvnc/+bug/1341829/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to