git: 9e7bd94765c2 - main - ports-mgmt/dialog4ports: fix segfault

Dmitry Marakasov amdmi3 at FreeBSD.org
Thu Sep 9 20:03:03 UTC 2021


The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9e7bd94765c2ae7bc47d40abf56da5ae412f9f5f

commit 9e7bd94765c2ae7bc47d40abf56da5ae412f9f5f
Author:     Dmitry Marakasov <amdmi3 at FreeBSD.org>
AuthorDate: 2021-09-09 19:56:11 +0000
Commit:     Dmitry Marakasov <amdmi3 at 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 at gentoo.org
    Submitted by:   rum1cro at 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;


More information about the dev-commits-ports-main mailing list