diff options
author | jkh <jkh@FreeBSD.org> | 1996-04-25 01:50:18 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-04-25 01:50:18 +0000 |
commit | 84accdee09f66de5bd4eb1ec224ca383fbd65057 (patch) | |
tree | 07296ca20b1f7b061d99cc7622789bd3f47c8fbc /gnu/lib/libdialog | |
parent | e2d6b10783e63957657fa710de2b2bbe382a8cfa (diff) | |
download | FreeBSD-src-84accdee09f66de5bd4eb1ec224ca383fbd65057.zip FreeBSD-src-84accdee09f66de5bd4eb1ec224ca383fbd65057.tar.gz |
alloca() was being called with highly bogus arguments due to brain
fade. Fixed.
Diffstat (limited to 'gnu/lib/libdialog')
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 2 | ||||
-rw-r--r-- | 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 5d7c03b..55d5138 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 cb1d1a7..7ec5a72 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); |