From: Seonah Moon Date: Thu, 26 Aug 2021 06:41:14 +0000 (+0900) Subject: Check a length of interface name X-Git-Tag: submit/tizen/20210830.063734^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F263100%2F1;p=platform%2Fcore%2Fapi%2Fnsd.git Check a length of interface name Change-Id: I3595f5140a905ef59a88945677293e9a285ca12f --- diff --git a/src/dns-sd/dns-sd.c b/src/dns-sd/dns-sd.c index 74f7656..89f211b 100644 --- a/src/dns-sd/dns-sd.c +++ b/src/dns-sd/dns-sd.c @@ -2088,7 +2088,7 @@ EXPORT_API int dnssd_create_remote_service(const char *service_type, remote_handle->watch_id = 0; found = GET_FOUND_DATA_P(remote_handle); - if (interface) { + if (interface && strlen(interface) != 0) { unsigned int if_index; if ((if_index = if_nametoindex(interface)) == 0) { DNSSD_LOGE("Invalid interface name");