Skip to content

Commit

Permalink
ports-mgmt/dialog4ports: fix segfault
Browse files Browse the repository at this point in the history
Fix segfault when moving selection in some dialog configurations

Reported by:	gad, kumba@gentoo.org
Submitted by:	rum1cro@yandex.ru (maintainer)
PR:		244204
  • Loading branch information
AMDmi3 committed Sep 9, 2021
1 parent 8eb9c34 commit 9e7bd94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports-mgmt/dialog4ports/Makefile
Expand Up @@ -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}/ \
Expand Down
17 changes: 17 additions & 0 deletions 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;

0 comments on commit 9e7bd94

Please sign in to comment.