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)
|
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 */
|
strcat(filename, snstr); /*< add sequence number */
|
||||||
}
|
}
|
||||||
@ -3072,4 +3072,4 @@ static int find_last_seqno(
|
|||||||
free(snstr);
|
free(snstr);
|
||||||
|
|
||||||
return seqno;
|
return seqno;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ HTTPD_session *client_data = NULL;
|
|||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!ISspace(buf[j]) && (i < sizeof(url) - 1) && (j < sizeof(buf) - 1)) {
|
while ((j < sizeof(buf) - 1) && !ISspace(buf[j]) && (i < sizeof(url) - 1)) {
|
||||||
url[i] = buf[j];
|
url[i] = buf[j];
|
||||||
i++; j++;
|
i++; j++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user