mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05: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) {
|
if(colp) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long num = strtol(colp, &endptr, 10);
|
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;
|
bar->width = (int)num;
|
||||||
curl_free(colp);
|
curl_free(colp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user