From: Miroslav Lichvar Date: Mon, 21 Nov 2022 11:21:05 +0000 (+0100) Subject: don't modify popt args in whiptail X-Git-Tag: r0-52-22~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f5d1d27f09b;p=thirdparty%2Fnewt.git don't modify popt args in whiptail Remove code that replaces the first popt argument with a string containing a part of the menu height (for some debugging purposes?). This fixes a crash with libpopt-1.19. --- diff --git a/whiptail.c b/whiptail.c index 627f1ee..8d3d256 100644 --- a/whiptail.c +++ b/whiptail.c @@ -202,12 +202,10 @@ static void spaceForButtons(int * height, int * width, int count, int full) { static int menuSize(int * height, int * width, enum mode mode, poptContext options) { const char ** argv = poptGetArgs(options); - const char ** items = argv; int h = 0; int tagWidth = 0; int descriptionWidth = 0; int overhead = 10; - static char buf[20]; if ( argv == 0 || *argv == 0 ) return 0; @@ -232,8 +230,6 @@ static int menuSize(int * height, int * width, enum mode mode, h = min(h, SLtt_Screen_Rows - *height - 4); *height = *height + h + 1; - sprintf(buf, "%d", h); - *items = buf; return 0; }