Date: Thu, 9 Sep 2021 20:03:02 GMT From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 9e7bd94765c2 - main - ports-mgmt/dialog4ports: fix segfault Message-ID: <202109092003.189K32Vs084236@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=9e7bd94765c2ae7bc47d40abf56da5ae412f9f5f commit 9e7bd94765c2ae7bc47d40abf56da5ae412f9f5f Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2021-09-09 19:56:11 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2021-09-09 20:02:40 +0000 ports-mgmt/dialog4ports: fix segfault Fix segfault when moving selection in some dialog configurations Reported by: gad, kumba@gentoo.org Submitted by: rum1cro@yandex.ru (maintainer) PR: 244204 --- ports-mgmt/dialog4ports/Makefile | 2 +- ports-mgmt/dialog4ports/files/patch-mixedlist.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ports-mgmt/dialog4ports/Makefile b/ports-mgmt/dialog4ports/Makefile index 1838aeb1f7fc..ae095d534143 100644 --- a/ports-mgmt/dialog4ports/Makefile +++ b/ports-mgmt/dialog4ports/Makefile @@ -2,7 +2,7 @@ PORTNAME= dialog4ports PORTVERSION= 0.1.6 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= ports-mgmt MASTER_SITES= https://files.etoilebsd.net/dialog4ports/ \ http://mirror.shatow.net/freebsd/${PORTNAME}/ \ diff --git a/ports-mgmt/dialog4ports/files/patch-mixedlist.c b/ports-mgmt/dialog4ports/files/patch-mixedlist.c new file mode 100644 index 000000000000..80e8a6c1191b --- /dev/null +++ b/ports-mgmt/dialog4ports/files/patch-mixedlist.c @@ -0,0 +1,17 @@ +--- mixedlist.c_old 2021-01-03 16:01:52.851092000 +0300 ++++ mixedlist.c 2021-01-03 16:06:04.266150000 +0300 +@@ -652,12 +652,12 @@ + break; + case DLGK_ITEM_PREV: + i = choice - 1; ++ if (choice == 0 && scrollamt == 0) ++ continue; + if (items[scrollamt + i].type == ITEM_SEPARATOR && (scrollamt + i) == 0) + i++; + else if (items[scrollamt + i].type == ITEM_SEPARATOR) + i--; +- if (choice == 0 && scrollamt == 0) +- continue; + break; + case DLGK_ITEM_NEXT: + i = choice + 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109092003.189K32Vs084236>