changed a sprintf call to the more secure snprintf
This commit is contained in:
parent
d31379ae2e
commit
e15ed4c7b9
@ -553,7 +553,8 @@ parse_config (void)
|
|||||||
if ((sptr->current_req->contents_len = strlen (contents)) != 0)
|
if ((sptr->current_req->contents_len = strlen (contents)) != 0)
|
||||||
{
|
{
|
||||||
sptr->current_req->contents = strdup (contents);
|
sptr->current_req->contents = strdup (contents);
|
||||||
sprintf (sptr->current_req->extra_hdrs,
|
snprintf (sptr->current_req->extra_hdrs,
|
||||||
|
sizeof(sptr->current_req->extra_hdrs),
|
||||||
"Content-length: %d\r\n",
|
"Content-length: %d\r\n",
|
||||||
sptr->current_req->contents_len);
|
sptr->current_req->contents_len);
|
||||||
sptr->current_req->extra_hdrs_len =
|
sptr->current_req->extra_hdrs_len =
|
||||||
|
Loading…
Reference in New Issue
Block a user