From: InHong Han Date: Mon, 13 Nov 2017 04:51:09 +0000 (+0900) Subject: Fix buffer overflow issue X-Git-Tag: accepted/tizen/unified/20171114.132339~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=200ab9c2527d53755c08eb094a064804f51977ee;p=platform%2Fcore%2Fuifw%2Fisf.git Fix buffer overflow issue Change-Id: Ib82a3b13e5233c37a9862d12db9da4d9fdde3fd4 (cherry picked from commit df4e7271f19da18a926e6d0b4081ab7d5b3d5a78) --- diff --git a/ism/src/scim_socket.cpp b/ism/src/scim_socket.cpp index 608e3ad..9afb080 100644 --- a/ism/src/scim_socket.cpp +++ b/ism/src/scim_socket.cpp @@ -267,7 +267,7 @@ SocketAddress::SocketAddressImpl::set_address (const String &addr) memset (un->sun_path, 0, sizeof (un->sun_path)); - strncpy (un->sun_path, real_addr.c_str (), sizeof (un->sun_path)); + strncpy (un->sun_path, real_addr.c_str (), sizeof (un->sun_path) - 1); un->sun_path[sizeof (un->sun_path) - 1] = '\0';