Fixes to Coverity defects 83027 and 72714
This commit is contained in:
@ -3048,7 +3048,7 @@ static int find_last_seqno(
|
||||
|
||||
for (i=0, p=parts; p->sp_string != NULL; i++, p=p->sp_next)
|
||||
{
|
||||
if (snstr != NULL && i == seqnoidx)
|
||||
if (snstr != NULL && i == seqnoidx && strnlen(snstr,NAME_MAX) < NAME_MAX)
|
||||
{
|
||||
strcat(filename, snstr); /*< add sequence number */
|
||||
}
|
||||
@ -3072,4 +3072,4 @@ static int find_last_seqno(
|
||||
free(snstr);
|
||||
|
||||
return seqno;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user