[SVACE] 142053,142054,142541 Fixed Svace issues 77/91277/1 accepted/tizen/common/20161007.060632 accepted/tizen/ivi/20161007.103828 accepted/tizen/mobile/20161007.103820 accepted/tizen/tv/20161007.103826 accepted/tizen/wearable/20161007.103823 submit/tizen/20161007.005815
authorJaehyun Kim <jeik01.kim@samsung.com>
Thu, 6 Oct 2016 12:44:14 +0000 (21:44 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Thu, 6 Oct 2016 12:46:50 +0000 (21:46 +0900)
Change-Id: I726f6ff6a16aceff67163f1d40cb00c96772acd6

packaging/capi-vpn-service.spec
src/capi_vpn_service.c

index 303e576..d46cc08 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       vpnsvc-pkg
 Summary:    VPN service library in TIZEN C API
-Version:    1.0.23
+Version:    1.0.24
 Release:    1
 Group:      System/Network
 License:    Apache-2.0
index bd57ef1..24aa119 100755 (executable)
@@ -966,7 +966,7 @@ EXPORT_API int vpnsvc_set_iface_name(vpnsvc_h handle, const char *iface_name)
                return VPNSVC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       strncpy(tun_s->name, iface_name, VPNSVC_VPN_IFACE_NAME_LEN);
+       g_strlcpy(tun_s->name, iface_name, VPNSVC_VPN_IFACE_NAME_LEN);
 
        return VPNSVC_ERROR_NONE;
 }
@@ -1102,7 +1102,7 @@ EXPORT_API int vpnsvc_set_local_ip_address(vpnsvc_h handle, const char *local_ip
                return VPNSVC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       strncpy(tun_s->local_ip, local_ip, VPNSVC_IP4_STRING_LEN);
+       g_strlcpy(tun_s->local_ip, local_ip, VPNSVC_IP4_STRING_LEN);
        
        return VPNSVC_ERROR_NONE;
 }
@@ -1126,7 +1126,7 @@ EXPORT_API int vpnsvc_set_remote_ip_address(vpnsvc_h handle, const char *remote_
                return VPNSVC_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       strncpy(tun_s->remote_ip, remote_ip, VPNSVC_IP4_STRING_LEN);
+       g_strlcpy(tun_s->remote_ip, remote_ip, VPNSVC_IP4_STRING_LEN);
 
        return VPNSVC_ERROR_NONE;
 }