summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog/prgbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/lib/libdialog/prgbox.c')
-rw-r--r--gnu/lib/libdialog/prgbox.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/prgbox.c b/gnu/lib/libdialog/prgbox.c
index 672609995542..0145389d4000 100644
--- a/gnu/lib/libdialog/prgbox.c
+++ b/gnu/lib/libdialog/prgbox.c
@@ -34,6 +34,11 @@ int dialog_prgbox(unsigned char *title, const unsigned char *line, int height, i
FILE *f;
unsigned char *s, buf[MAX_LEN];
+ if (height < 0 || width < 0) {
+ endwin();
+ fprintf(stderr, "\nAutosizing is impossible in dialog_prgbox().\n");
+ exit(-1);
+ }
/* center dialog box on screen */
x = (COLS - width)/2;
y = (LINES - height)/2;