Compare commits

..

No commits in common. "e6846b320da86bab8b196d14b7a86f94f35b42d5" and "48dfd5e93ba29c96a60b8762665634f899fa0742" have entirely different histories.

5 changed files with 3 additions and 93 deletions

View File

@ -1,70 +0,0 @@
From e86752820993a00e3d28350cbe46878ba95d9012 Mon Sep 17 00:00:00 2001
From: nicm <nicm>
Date: Wed, 24 Aug 2022 07:22:30 +0000
Subject: [PATCH] Check for NULL returns from bufferevent_new.
---
control.c | 4 ++++
file.c | 4 ++++
window.c | 2 ++
3 files changed, 10 insertions(+)
diff --git a/control.c b/control.c
index 73286e0..6183a00 100644
--- a/control.c
+++ b/control.c
@@ -775,6 +775,8 @@ 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 +784,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);
diff --git a/file.c b/file.c
index b2f155f..04a907b 100644
--- a/file.c
+++ b/file.c
@@ -585,6 +585,8 @@ file_write_open(struct client_files *files, struct tmuxpeer *peer,
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 tmuxpeer *peer,
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;
diff --git a/window.c b/window.c
index c0cd9bd..294a1f0 100644
--- a/window.c
+++ b/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);
--
2.33.0

BIN
tmux-2.9a.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,8 @@
%global _hardened_build 1 %global _hardened_build 1
Name: tmux Name: tmux
Version: 3.3a Version: 2.9a
Release: 2 Release: 1
Summary: A terminal multiplexer Summary: A terminal multiplexer
License: ISC and BSD License: ISC and BSD
@ -10,8 +10,6 @@ URL: https://tmux.github.io/
Source0: https://github.com/%{name}/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/%{name}/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: bash_completion_tmux.sh Source1: bash_completion_tmux.sh
Patch6000: backport-CVE-2022-47016.patch
BuildRequires: gcc libevent-devel ncurses-devel libutempter-devel BuildRequires: gcc libevent-devel ncurses-devel libutempter-devel
%description %description
@ -61,23 +59,9 @@ fi
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%doc CHANGES TODO
%{_mandir}/man1/%{name}.1.gz %{_mandir}/man1/%{name}.1.gz
%changelog %changelog
* Sat Feb 04 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 3.3a-2
- fix CVE-2022-47016
* Wed Jul 13 2022 zhaomengmeng <zhaomengmeng@kylinos.cn> - 3.3a-1
- DESC:upgrade to 3.3a
* Fri Dec 3 2021 yangcheng <yangcheng87@huawei.com> - 3.2a-1
- DESC:upgrade to 3.2a
* Sat Nov 28 2020 wangye <wangye70@huawei.com> - 3.1-2
- DESC:fix CVE
* Sat Jun 20 2020 weiwei_150212 <tianwei12@huawei.com> - 3.1-1
- DESC:update to release 3.1
* Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.9a-1 * Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.9a-1
- Package init - Package init

View File

@ -1,4 +0,0 @@
version_control: github
src_repo: tmux/tmux
tag_prefix: "^v"
seperator: "."