Restrict size of read.

This commit is contained in:
Hisham Muhammad 2014-04-21 19:18:08 -03:00
parent f677843288
commit f239b62b90
1 changed files with 1 additions and 1 deletions

View File

@ -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)", &param); int ok = sscanf(paren, "(%10d)", &param);
if (!ok) param = 0; if (!ok) param = 0;
*paren = '\0'; *paren = '\0';
} }