From 02836a445ddcb29c086a76c975ec1014ba30e668 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Thu, 25 Apr 1996 01:50:18 +0000 Subject: [PATCH] alloca() was being called with highly bogus arguments due to brain fade. Fixed. --- gnu/lib/libdialog/checklist.c | 2 +- gnu/lib/libdialog/radiolist.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index 5d7c03b052b3..55d51386ed96 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -49,7 +49,7 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi dialogMenuItem *ditems; /* Allocate space for storing item on/off status */ - if ((status = alloca(sizeof(int) * abs(item_no))) == NULL) { + if ((status = alloca(sizeof(int) * abs(cnt))) == NULL) { endwin(); fprintf(stderr, "\nCan't allocate memory in dialog_checklist().\n"); exit(-1); diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c index cb1d1a703afc..7ec5a72085c8 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libdialog/radiolist.c @@ -49,7 +49,7 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi dialogMenuItem *ditems; /* Allocate space for storing item on/off status */ - if ((status = alloca(sizeof(int) * abs(item_no))) == NULL) { + if ((status = alloca(sizeof(int) * abs(cnt))) == NULL) { endwin(); fprintf(stderr, "\nCan't allocate memory in dialog_radiolist().\n"); exit(-1);