From: Seonah Moon Date: Wed, 26 Jan 2022 04:53:36 +0000 (+0900) Subject: Use snprintf() instead of sprintf() X-Git-Tag: submit/tizen/20220126.063121~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F270128%2F1;p=platform%2Fcore%2Fapi%2Fvine.git Use snprintf() instead of sprintf() Change-Id: Iaad7f92e36941bbe2eac55f941e9ad24e79be703 --- diff --git a/packaging/capi-network-vine.spec b/packaging/capi-network-vine.spec index fb39f98..0ea5551 100755 --- a/packaging/capi-network-vine.spec +++ b/packaging/capi-network-vine.spec @@ -3,7 +3,7 @@ %bcond_without use_glib_event_loop Name: capi-network-vine Summary: An service discovery framework -Version: 1.2.7 +Version: 1.2.8 Release: 0 Group: Network & Connectivity/API License: Apache-2.0 diff --git a/src/vine-dp.cpp b/src/vine-dp.cpp index 23806c4..2a16363 100755 --- a/src/vine-dp.cpp +++ b/src/vine-dp.cpp @@ -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);