curl:progressbarinit: ignore column width from terminals < 20

To avoid division by zero - or other issues.

Reported-by: Daniel Marjamäki
Closes #4818
This commit is contained in:
Daniel Stenberg 2020-01-14 22:18:12 +01:00
parent 68403cdbc6
commit c2feed05bc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 2 additions and 1 deletions

View File

@ -251,7 +251,8 @@ void progressbarinit(struct ProgressData *bar,
}
}
#endif /* TIOCGSIZE */
bar->width = cols;
if(cols > 20)
bar->width = cols;
}
if(!bar->width)