tools/cvsparser.c: Add a check to avoid access past the end of a fixed size array
This commit is contained in:
parent
c431177c0f
commit
35b12f7f0f
@ -213,6 +213,12 @@ int parse_csvline(char *ptr)
|
||||
|
||||
do
|
||||
{
|
||||
if (nparams >= MAX_FIELDS)
|
||||
{
|
||||
fprintf(stderr, "%d: Too many Parameters: \"%s\"\n", g_lineno, g_line);
|
||||
exit(8);
|
||||
}
|
||||
|
||||
ptr = copy_parm(ptr, &g_parm[nparms][0]);
|
||||
nparms++;
|
||||
ptr = find_parm(ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user