Use snprintf() instead of sprintf() 87/270987/1 accepted/tizen/6.5/unified/20220216.175755 submit/tizen_6.5/20220215.005714
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 26 Jan 2022 04:53:36 +0000 (13:53 +0900)
committercheoleun moon <chleun.moon@samsung.com>
Mon, 14 Feb 2022 01:56:20 +0000 (10:56 +0900)
Change-Id: Iaad7f92e36941bbe2eac55f941e9ad24e79be703

packaging/capi-network-vine.spec
src/vine-dp.cpp

index 9b1c03f7be33a8958188f311709a5fdaf012002d..f0bbf4243ec720499ee486e1cc7a468956089e2f 100755 (executable)
@@ -3,7 +3,7 @@
 %bcond_without use_glib_event_loop
 Name:    capi-network-vine
 Summary: An service discovery framework
-Version: 1.1.15
+Version: 1.1.16
 Release: 0
 Group:   Network & Connectivity/API
 License: Apache-2.0
index 23806c4c4ef0f5c354ff17c0518bc6db6fa3678d..2a16363bbc2e71409f45aea46a60594f040a2472 100755 (executable)
@@ -1253,7 +1253,7 @@ int DPPubSub::publish_service()
        vine_service_set_port(service, mListenPort);
 
        mRank = create_rank();
-       sprintf(rank_str, "%d", mRank);
+       snprintf(rank_str, VINE_DP_PUBSUB_RANK_LEN, "%d", mRank);
 
        vine_service_set_name(service, mId.c_str());
        vine_service_add_attribute(service, VINE_DP_PUBSUB_RANK_KEY, (const char *)rank_str);