mirror of
https://github.com/curl/curl.git
synced 2024-12-09 06:30:06 +08:00
curl: only accept COLUMNS less than 10000
... as larger values would rather indicate something silly (and could potentially cause buffer problems). Reported-by: pendrek at hackerone Closes #4114
This commit is contained in:
parent
275b74a53d
commit
952998cbdb
@ -210,7 +210,8 @@ void progressbarinit(struct ProgressData *bar,
|
||||
if(colp) {
|
||||
char *endptr;
|
||||
long num = strtol(colp, &endptr, 10);
|
||||
if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 20))
|
||||
if((endptr != colp) && (endptr == colp + strlen(colp)) && (num > 20) &&
|
||||
(num < 10000))
|
||||
bar->width = (int)num;
|
||||
curl_free(colp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user