Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2023 12:04:44 GMT
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 0605420a9794 - 2023Q1 - sysutils/tmux: fix some NULL pointer
Message-ID:  <202302221204.31MC4isT013386@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2023Q1 has been updated by mat:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0605420a979476493a5ad3988f13014ff75adc3a

commit 0605420a979476493a5ad3988f13014ff75adc3a
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-02-22 11:58:25 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2023-02-22 12:00:35 +0000

    sysutils/tmux: fix some NULL pointer
    
    PR:     269390
    (cherry picked from commit 0610124469717aef109a8b83c4d303f1facb149c)
---
 sysutils/tmux/Makefile                   |  1 +
 sysutils/tmux/files/patch-e86752820993a0 | 54 ++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile
index f8550ef4c2d2..ad6a518b40f4 100644
--- a/sysutils/tmux/Makefile
+++ b/sysutils/tmux/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	tmux
 PORTVERSION=	3.3a
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	https://github.com/tmux/tmux/releases/download/${PORTVERSION}/
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
diff --git a/sysutils/tmux/files/patch-e86752820993a0 b/sysutils/tmux/files/patch-e86752820993a0
new file mode 100644
index 000000000000..e487fb42fada
--- /dev/null
+++ b/sysutils/tmux/files/patch-e86752820993a0
@@ -0,0 +1,54 @@
+Index: control.c
+===================================================================
+--- control.c.orig	2022-04-25 08:25:13 UTC
++++ control.c
+@@ -775,6 +775,9 @@ control_start(struct client *c)
+ 
+ 	cs->read_event = bufferevent_new(c->fd, control_read_callback,
+ 	    control_write_callback, control_error_callback, c);
++	if (cs->read_event == NULL)
++		fatalx("out of memory");
++
+ 	bufferevent_enable(cs->read_event, EV_READ);
+ 
+ 	if (c->flags & CLIENT_CONTROLCONTROL)
+@@ -782,6 +785,8 @@ control_start(struct client *c)
+ 	else {
+ 		cs->write_event = bufferevent_new(c->out_fd, NULL,
+ 		    control_write_callback, control_error_callback, c);
++		if (cs->write_event == NULL)
++			fatalx("out of memory");
+ 	}
+ 	bufferevent_setwatermark(cs->write_event, EV_WRITE, CONTROL_BUFFER_LOW,
+ 	    0);
+--- file.c.orig	2022-04-25 08:25:13 UTC
++++ file.c
+@@ -585,6 +585,8 @@ file_write_open(struct client_files *files, struct tmu
+ 
+ 	cf->event = bufferevent_new(cf->fd, NULL, file_write_callback,
+ 	    file_write_error_callback, cf);
++	if (cf->event == NULL)
++		fatalx("out of memory");
+ 	bufferevent_enable(cf->event, EV_WRITE);
+ 	goto reply;
+ 
+@@ -744,6 +746,8 @@ file_read_open(struct client_files *files, struct tmux
+ 
+ 	cf->event = bufferevent_new(cf->fd, file_read_callback, NULL,
+ 	    file_read_error_callback, cf);
++	if (cf->event == NULL)
++		fatalx("out of memory");
+ 	bufferevent_enable(cf->event, EV_READ);
+ 	return;
+ 
+--- window.c.orig	2022-04-25 08:25:14 UTC
++++ window.c
+@@ -1042,6 +1042,8 @@ window_pane_set_event(struct window_pane *wp)
+ 
+ 	wp->event = bufferevent_new(wp->fd, window_pane_read_callback,
+ 	    NULL, window_pane_error_callback, wp);
++	if (wp->event == NULL)
++		fatalx("out of memory");
+ 	wp->ictx = input_init(wp, wp->event, &wp->palette);
+ 
+ 	bufferevent_enable(wp->event, EV_READ|EV_WRITE);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302221204.31MC4isT013386>