Cygwin: AF_UNIX: fix creating abstract socket symlink name
Add missing NUL termination when creating symlink representing abstract socket. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
8b6804b8a8
commit
1bb3d65182
|
@ -223,7 +223,8 @@ fhandler_socket_unix::create_abstract_link (const sun_name_t *sun,
|
||||||
/* NUL bytes have no special meaning in an abstract socket name, so
|
/* NUL bytes have no special meaning in an abstract socket name, so
|
||||||
we assume iso-8859-1 for simplicity and transpose the string.
|
we assume iso-8859-1 for simplicity and transpose the string.
|
||||||
transform_chars_af_unix is doing just that. */
|
transform_chars_af_unix is doing just that. */
|
||||||
transform_chars_af_unix (p, sun->un.sun_path, sun->un_len);
|
p = transform_chars_af_unix (p, sun->un.sun_path, sun->un_len);
|
||||||
|
*p = L'\0';
|
||||||
RtlInitUnicodeString (&uname, name);
|
RtlInitUnicodeString (&uname, name);
|
||||||
InitializeObjectAttributes (&attr, &uname, OBJ_CASE_INSENSITIVE,
|
InitializeObjectAttributes (&attr, &uname, OBJ_CASE_INSENSITIVE,
|
||||||
get_shared_parent_dir (), NULL);
|
get_shared_parent_dir (), NULL);
|
||||||
|
|
Loading…
Reference in New Issue