Commit 1eb3ce6d authored by Jelte Jansen's avatar Jelte Jansen Committed by JINMEI Tatuya
Browse files

[2275] fix strncpy in socketrequestortest

parent 93343897
...@@ -410,8 +410,8 @@ private: ...@@ -410,8 +410,8 @@ private:
isc_throw(Unexpected, isc_throw(Unexpected,
"mkstemp() created a filename too long for sun_path"); "mkstemp() created a filename too long for sun_path");
} }
memset(socket_address.sun_path, 0, sizeof(socket_address.sun_path)); strncpy(socket_address.sun_path, path_,
strncpy(socket_address.sun_path, path_, len); sizeof(socket_address.sun_path));
#ifdef HAVE_SA_LEN #ifdef HAVE_SA_LEN
socket_address.sun_len = len; socket_address.sun_len = len;
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment