mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Use apr_cpystrn instead of strncpy since strncpy can create an unterminated string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@727777 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -104,7 +104,7 @@ static apr_status_t get_socket_from_path(apr_pool_t *p,
|
||||
}
|
||||
|
||||
sa.sun_family = AF_UNIX;
|
||||
strncpy(sa.sun_path, path, sizeof(sa.sun_path));
|
||||
apr_cpystrn(sa.sun_path, path, sizeof(sa.sun_path));
|
||||
|
||||
rv = socket_connect_un(s, &sa);
|
||||
if (rv) {
|
||||
|
Reference in New Issue
Block a user