Skip to content

Commit e9a9634

Browse files
committed
Fix remaining libhttpd warning
1 parent d489ee5 commit e9a9634

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libhttpd/api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@ httpdSetResponse(request * r, const char *msg)
686686
void
687687
httpdSetContentType(request * r, const char *type)
688688
{
689-
strcpy(r->response.contentType, type);
689+
strncpy(r->response.contentType, type, HTTP_MAX_URL - 1);
690+
r->response.contentType[HTTP_MAX_URL - 1] = 0;
690691
}
691692

692693
void

0 commit comments

Comments
 (0)