Merge "Buffer not null terminated"
authorHoseon LEE <hoseon46.lee@samsung.com>
Wed, 17 Apr 2013 08:39:09 +0000 (17:39 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 17 Apr 2013 08:39:09 +0000 (17:39 +0900)
src/pkg-manager/backendlib.cpp

index e569561..5637e1f 100644 (file)
@@ -368,7 +368,7 @@ int getWidgetDetailInfoFromPackage(const char* pkgPath,
     if (!configInfo.tizenAppId.IsNull()) {
         strncpy(pkg_detail_info->pkg_name,
                 DPL::ToUTF8String(*configInfo.tizenAppId).c_str(),
-                PKG_NAME_STRING_LEN_MAX);
+                PKG_NAME_STRING_LEN_MAX - 1);
     }
     if (!configInfo.version.IsNull()) {
         strncpy(pkg_detail_info->version,
@@ -410,7 +410,7 @@ int getWidgetDetailInfoFromPackage(const char* pkgPath,
     if (!configInfo.tizenMinVersionRequired.IsNull()) {
         strncpy(pkg_detail_info->min_platform_version,
                 DPL::ToUTF8String(*configInfo.tizenMinVersionRequired).c_str(),
-                PKG_VERSION_STRING_LEN_MAX);
+                PKG_VERSION_STRING_LEN_MAX - 1);
     }
 
     if (!configInfo.authorName.IsNull()) {