Commit a96bec36 authored by Max Kellermann's avatar Max Kellermann

socket_util: fixed format warning

g_set_error() is a printf-like function, and expects a format string. Using the return value of gai_strerror() is unsafe.
parent 6419cc54
......@@ -71,7 +71,7 @@ sockaddr_to_string(const struct sockaddr *sa, size_t length, GError **error)
NI_NUMERICHOST|NI_NUMERICSERV);
if (ret != 0) {
g_set_error(error, g_quark_from_static_string("netdb"), ret,
gai_strerror(ret));
"%s", gai_strerror(ret));
return NULL;
}
......
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