mirror of https://github.com/xzeldon/htop.git
Restrict size of read.
This commit is contained in:
parent
f677843288
commit
f239b62b90
2
Header.c
2
Header.c
|
@ -71,7 +71,7 @@ void Header_createMeter(Header* this, char* name, HeaderSide side) {
|
||||||
char* paren = strchr(name, '(');
|
char* paren = strchr(name, '(');
|
||||||
int param = 0;
|
int param = 0;
|
||||||
if (paren) {
|
if (paren) {
|
||||||
int ok = sscanf(paren, "(%d)", ¶m);
|
int ok = sscanf(paren, "(%10d)", ¶m);
|
||||||
if (!ok) param = 0;
|
if (!ok) param = 0;
|
||||||
*paren = '\0';
|
*paren = '\0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue