If given version string is not start with allowed pattern,
GetPackageVersion() will return empty string.
This patch will check its result and
fails entire install procedure if so.
Change-Id: I14ebc962f0dd7167b9d166a4844960744216fc9b
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
const std::string& version = wgt_info->version();
manifest->ns = strdup(kTizenPackageXmlNamespace);
- manifest->version = strdup(GetPackageVersion(version).c_str());
+ std::string version_tmp = GetPackageVersion(version);
+ if (version_tmp.empty()) {
+ LOG(ERROR) << "Invalid version format : " << version;
+ return false;
+ }
+ manifest->version = strdup(version_tmp.c_str());
for (auto& item : wgt_info->description_set()) {
description_x* description = reinterpret_cast<description_x*>