Skip to content

Commit 2b25880

Browse files
committed
net/vncreflector: Fix a buffer overrun issue
While here, regen the patches and add license information PR: 290129 Reported by: Chun Cheng Yeh <[email protected]>
1 parent 13679a6 commit 2b25880

File tree

6 files changed

+35
-11
lines changed

6 files changed

+35
-11
lines changed

net/vncreflector/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PORTNAME= vncreflector
22
PORTVERSION= 1.2.4
3-
PORTREVISION= 7
3+
PORTREVISION= 8
44
CATEGORIES= net
55
MASTER_SITES= SF/vnc-reflector/vnc-reflector/${PORTVERSION}
66
DISTNAME= vnc_reflector-${PORTVERSION}
@@ -9,6 +9,9 @@ MAINTAINER= [email protected]
99
COMMENT= Multi-client VNC proxy server
1010
WWW= https://sourceforge.net/projects/vnc-reflector/
1111

12+
LICENSE= BSD3CLAUSE
13+
LICENSE_FILE= ${WRKSRC}/LICENSE
14+
1215
USES= jpeg
1316
USE_RC_SUBR= vncreflector
1417

net/vncreflector/files/patch-Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--- Makefile.orig
1+
--- Makefile.orig 2003-04-16 17:32:42 UTC
22
+++ Makefile
33
@@ -14,10 +14,10 @@
44
#
@@ -13,7 +13,7 @@
1313
# Debug (strict)
1414
#CFLAGS = -g -pedantic -Wall $(IFLAGS)
1515
# Debug (profiling)
16-
@@ -50,7 +50,7 @@
16+
@@ -50,7 +50,7 @@ $(PROG): $(OBJS)
1717
default: $(PROG)
1818

1919
$(PROG): $(OBJS)
@@ -22,7 +22,7 @@
2222

2323
clean:
2424
rm -f $(OBJS) *core* ./*~ ./*.bak $(PROG)
25-
@@ -59,7 +59,7 @@
25+
@@ -59,7 +59,7 @@ depend: $(SRCS)
2626
$(MAKEDEPEND) $(MAKEDEPFLAGS) -I. $(SRCS) 2> /dev/null
2727

2828
.c.o:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- host_connect.c.orig 2025-10-10 10:32:37 UTC
2+
+++ host_connect.c
3+
@@ -232,7 +232,7 @@ static void rf_host_ver(void)
4+
char *buf = (char *)cur_slot->readbuf;
5+
int major = 3, minor = 3;
6+
int remote_major, remote_minor;
7+
- char ver_msg[12];
8+
+ char ver_msg[13];
9+
10+
if ( strncmp(buf, "RFB ", 4) != 0 || !isdigit(buf[4]) ||
11+
!isdigit(buf[4]) || !isdigit(buf[5]) || !isdigit(buf[6]) ||
12+
@@ -256,7 +256,8 @@ static void rf_host_ver(void)
13+
log_write(LL_WARN, "Protocol sub-version does not match (ignoring)");
14+
}
15+
16+
- sprintf(ver_msg, "RFB %03d.%03d\n", abs(major) % 999, abs(minor) % 999);
17+
+ snprintf(ver_msg, sizeof(ver_msg),
18+
+ "RFB %03d.%03d\n", abs(major) % 999, abs(minor) % 999);
19+
aio_write(NULL, ver_msg, 12);
20+
aio_setread(rf_host_auth, NULL, 4);
21+
}

net/vncreflector/files/patch-logging.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- logging.c
1+
--- logging.c.orig 2003-04-21 17:20:35 UTC
22
+++ logging.c
3-
@@ -138,8 +138,6 @@
3+
@@ -138,8 +138,6 @@ void log_write(int level, char *format, ...)
44
char time_buf[32];
55
char level_char = ' ';
66

@@ -9,7 +9,7 @@
99
if ( (log_fp != NULL && level <= log_file_level) ||
1010
level <= log_stderr_level ) {
1111
now = time(NULL);
12-
@@ -150,18 +148,21 @@
12+
@@ -150,18 +148,21 @@ void log_write(int level, char *format, ...)
1313

1414
if (level <= log_file_level) {
1515
fprintf(log_fp, "%s %c ", time_buf, (int)level_char);

net/vncreflector/files/patch-main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- main.c.orig
1+
--- main.c.orig 2003-01-11 09:44:02 UTC
22
+++ main.c
3-
@@ -464,7 +464,7 @@
3+
@@ -464,7 +464,7 @@ static int init_screen_info(void)
44

55
static int init_screen_info(void)
66
{

net/vncreflector/files/patch-region.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- region.c.orig
1+
--- region.c.orig 2002-09-21 12:43:01 UTC
22
+++ region.c
3-
@@ -70,6 +70,7 @@
3+
@@ -70,6 +70,7 @@ SOFTWARE.
44
* *
55
*****************************************************************/
66

0 commit comments

Comments
 (0)