mbuffer: update to 20210328.
This commit is contained in:
parent
09433d715e
commit
d273e676cd
2 changed files with 3 additions and 36 deletions
|
@ -1,33 +0,0 @@
|
||||||
Subject: [PATCH] mbuffer: don't cancel ReaderThr.
|
|
||||||
|
|
||||||
joinSenders is called after ReaderThr has been joined, which makes the
|
|
||||||
pthread_cancel call in cancelAll undefined behavior and a case of
|
|
||||||
use-after-free. Since the thread will already have been joined in main
|
|
||||||
by the time joinSenders is called, there is no need to cancel it, so
|
|
||||||
that call can simply be removed.
|
|
||||||
|
|
||||||
Furthermore, we don't have to account for situations where pthread_join
|
|
||||||
can fail, because this program doesn't generate them. If there were
|
|
||||||
other threads which tried to join readerThr at the same time, a
|
|
||||||
successful pthread_join call should also set Status=0, so pthread_cancel
|
|
||||||
isn't called. However, that isn't necessary.
|
|
||||||
---
|
|
||||||
mbuffer.c | 2 --
|
|
||||||
1 file changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mbuffer.c b/mbuffer.c
|
|
||||||
index 79c997f..6e65277 100644
|
|
||||||
--- a/mbuffer.c
|
|
||||||
+++ b/mbuffer.c
|
|
||||||
@@ -166,8 +166,6 @@ static void cancelAll(void)
|
|
||||||
d->result = "canceled";
|
|
||||||
d = d->next;
|
|
||||||
} while (d);
|
|
||||||
- if (Status)
|
|
||||||
- (void) pthread_cancel(ReaderThr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
2.30.2
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'mbuffer'
|
# Template file for 'mbuffer'
|
||||||
pkgname=mbuffer
|
pkgname=mbuffer
|
||||||
version=20210209
|
version=20210328
|
||||||
revision=2
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
makedepends="openssl-devel"
|
makedepends="openssl-devel"
|
||||||
checkdepends="tar"
|
checkdepends="tar"
|
||||||
|
@ -10,6 +10,6 @@ maintainer="Diogo Leal <diogo@diogoleal.com>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://www.maier-komor.de/mbuffer.html"
|
homepage="https://www.maier-komor.de/mbuffer.html"
|
||||||
distfiles="https://www.maier-komor.de/software/mbuffer/mbuffer-${version}.tgz"
|
distfiles="https://www.maier-komor.de/software/mbuffer/mbuffer-${version}.tgz"
|
||||||
checksum=e81f2788e2621f20f848181ef2cb19ac6d12328691437f301574b253fd899a0c
|
checksum=51b5b8d8488991a55fe1dfce90130f9e47bc1ce286ba03b4f628c04b784fdc5d
|
||||||
patch_args=-Np1
|
patch_args=-Np1
|
||||||
conf_files="/etc/mbuffer.rc"
|
conf_files="/etc/mbuffer.rc"
|
||||||
|
|
Loading…
Reference in a new issue