fix prevent issue
authorYong Song <yong.song@samsung.com>
Wed, 14 Aug 2013 00:46:10 +0000 (09:46 +0900)
committerYong Song <yong.song@samsung.com>
Wed, 14 Aug 2013 00:46:10 +0000 (09:46 +0900)
Change-Id: I83af47a421437e3b44eb6146caed7a6065d1d68c

appinfo/appinfo.c

index d3c0718..5078f24 100644 (file)
@@ -358,7 +358,7 @@ int appinfo_update_submode_execname_and_appid(const char* execname)
        }
 
        const size_t max_len = MAX_APPID - MAX_OSP_PKGID - 1;
-       const size_t size = MIN(strlen(execname) - 1, max_len - 1);
+       const size_t size = MIN(strlen(execname), max_len - 1);
        strncpy(__appid + MAX_OSP_PKGID + 1, execname, size);
        __appid[size + MAX_OSP_PKGID + 1] = '\0';