[Bug 273330] net/tightvnc: tightvnc-patch-ansi breaks Xvnc

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 24 Aug 2023 14:42:08 UTC

            Bug ID: 273330
           Summary: net/tightvnc: tightvnc-patch-ansi breaks Xvnc
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: dinoex@FreeBSD.org
          Reporter: yuripv@FreeBSD.org
          Assignee: dinoex@FreeBSD.org
             Flags: maintainer-feedback?(dinoex@FreeBSD.org)

Specifically this part of the patch:

--- Xvnc/lib/font/fontfile/bufio.c.orig 2002-04-30 13:07:31 UTC
+++ Xvnc/lib/font/fontfile/bufio.c
@@ -45,11 +45,12 @@ extern int errno;

-BufFileCreate (private, io, skip, close)
-    char    *private;
-    int            (*io)();
-    int            (*skip)();
-    int            (*close)();
+BufFileCreate (private, io_get, io_put, skip, close)
+    int     private;
+    int            (*io_get)(struct _buffile *f);
+    int            (*io_put)(int, struct _buffile *f);
+    int            (*skip)(struct _buffile *f, int);
+    int            (*close)(struct _buffile *f, int);

...makes Xvnc crash with:

Core was generated by `Xvnc :6 -desktop X -httpd
/usr/local/share/tightvnc/classes -auth /home/yuri/.Xa'.
Program terminated with signal SIGSEGV, Segmentation fault.
Address not mapped to object.
#0  0x00000000002e3796 in BufZipFileFill (f=0x3e46160e4810) at gunzip.c:100
100       switch (x->zstat) {
(gdb) bt
#0  0x00000000002e3796 in BufZipFileFill (f=0x3e46160e4810) at gunzip.c:100
#1  0x00000000002cbc71 in pcfGetLSB32 (file=0x3e46160e4810) at pcfread.c:55
#2  0x00000000002cb054 in pcfReadTOC (file=0x3e46160e4810, countp=0x820f69784)
at pcfread.c:116
#3  0x00000000002ca3c9 in pcfReadFont (pFont=0x3e46160294e0,
file=0x3e46160e4810, bit=0, byte=0, glyph=4, scan=1)
    at pcfread.c:374

Looking at gunzip.c:

static int BufZipFileFill (f)
    BufFilePtr      f;
  xzip_buf *x = (xzip_buf *)f->private;

But now private is trimmed down to int because of the change above.

It would also help to remove the -Wno-int-conversion from Makefile as it
clearly shows the problem here.

You are receiving this mail because:
You are the assignee for the bug.