summaryrefslogtreecommitdiff
path: root/src/XmlHandler/ManifestHandler.cpp
diff options
context:
space:
mode:
authorDongeup Ham <dongeup.ham@samsung.com>2012-12-27 13:58:15 +0900
committerDongeup Ham <dongeup.ham@samsung.com>2012-12-27 13:58:15 +0900
commiteb04667e6caaf20a7016ec9122ba9b54a2ed7b2d (patch)
tree669bbb9a4fad38b1252dc8da3caa6d08df0f1589 /src/XmlHandler/ManifestHandler.cpp
parent7111af69a59fcfebeef7248b96f76c6e8f0a1eac (diff)
downloadinstaller-eb04667e6caaf20a7016ec9122ba9b54a2ed7b2d.tar.gz
installer-eb04667e6caaf20a7016ec9122ba9b54a2ed7b2d.tar.bz2
installer-eb04667e6caaf20a7016ec9122ba9b54a2ed7b2d.zip
Prevent issues are fixed.
Change-Id: I2fb8620fa55a66b3cfca69bc42837bf305bdb1f3 Signed-off-by: Dongeup Ham <dongeup.ham@samsung.com>
Diffstat (limited to 'src/XmlHandler/ManifestHandler.cpp')
-rwxr-xr-xsrc/XmlHandler/ManifestHandler.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/XmlHandler/ManifestHandler.cpp b/src/XmlHandler/ManifestHandler.cpp
index 521d6ae..3c742f4 100755
--- a/src/XmlHandler/ManifestHandler.cpp
+++ b/src/XmlHandler/ManifestHandler.cpp
@@ -366,7 +366,7 @@ ManifestHandler::OnCharacters(const char *pCharacters)
bool
ManifestHandler::OnPrivilegesStartElement(void)
{
- __pPrivilegeList = new ArrayList;
+ __pPrivilegeList = new (std::nothrow) ArrayList;
TryReturn(__pPrivilegeList, false, "[osp-installer] __pPrivilegeList is null");
AppLogTag(OSP_INSTALLER, "<Privileges>");
@@ -379,7 +379,7 @@ ManifestHandler::OnUiAppStartElement(void)
{
XmlAttribute *pAttr = null;
- __pPackageAppInfoImpl = new _PackageAppInfoImpl;
+ __pPackageAppInfoImpl = new (std::nothrow) _PackageAppInfoImpl;
TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
__pAppData = new (std::nothrow) AppData;
@@ -400,7 +400,7 @@ ManifestHandler::OnServiceAppStartElement(void)
{
XmlAttribute *pAttr = null;
- __pPackageAppInfoImpl = new _PackageAppInfoImpl;
+ __pPackageAppInfoImpl = new (std::nothrow) _PackageAppInfoImpl;
TryReturn(__pPackageAppInfoImpl, false, "[osp-installer] __pPackageAppInfoImpl is null");
__pAppData = new (std::nothrow) AppData;
@@ -468,7 +468,7 @@ ManifestHandler::OnUiScalabilityStartElement(void)
pCoordinateSystem = pAttr->Find("CoordinateSystem");
if (pCoordinateSystem)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ _AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
pAppFeatureInfo->SetName("CoordinateSystem");
@@ -482,7 +482,7 @@ ManifestHandler::OnUiScalabilityStartElement(void)
pBaseScreenSize = pAttr->Find("BaseScreenSize");
if (pBaseScreenSize)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ _AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
pAppFeatureInfo->SetName("BaseScreenSize");
@@ -496,7 +496,7 @@ ManifestHandler::OnUiScalabilityStartElement(void)
pLogicalCoordinate = pAttr->Find("LogicalCoordinate");
if (pLogicalCoordinate)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ _AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
pAppFeatureInfo->SetName("LogicalCoordinate");
@@ -525,7 +525,7 @@ ManifestHandler::OnUiThemeStartElement(void)
pSystemTheme = pAttr->Find("SystemTheme");
if (pSystemTheme)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ _AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
pAppFeatureInfo->SetName("SystemTheme");
@@ -539,7 +539,7 @@ ManifestHandler::OnUiThemeStartElement(void)
pUserDefinedTheme = pAttr->Find("UserDefinedTheme");
if (pUserDefinedTheme)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ _AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
pAppFeatureInfo->SetName("UserDefinedTheme");
@@ -569,7 +569,7 @@ ManifestHandler::OnAppControlStartElement(void)
pAttrValue2 = pAttr->Find("Category");
TryReturn(pAttrValue2, true, "[osp-installer] pAttrValue2 is null");
- __pAppControlInfoImpl = new _AppControlInfoImpl;
+ __pAppControlInfoImpl = new (std::nothrow) _AppControlInfoImpl;
TryReturn(__pAppControlInfoImpl, false, "[osp-installer] __pAppControlInfoImpl is null");
__pAppControlInfoImpl->SetProviderId(pAttrValue1);
@@ -592,7 +592,7 @@ ManifestHandler::OnCapabilityStartElement(void)
pAttrValue = pAttr->Find("OperationId");
TryReturn(pAttrValue, true, "[osp-installer] pAttrValue1 is null");
- __pAppControlCapabilityInfoImpl = new _AppControlCapabilityInfoImpl;
+ __pAppControlCapabilityInfoImpl = new (std::nothrow) _AppControlCapabilityInfoImpl;
TryReturn(__pAppControlCapabilityInfoImpl, false, "[osp-installer] __pAppControlCapabilityInfoImpl is null");
__pAppControlCapabilityInfoImpl->SetOperationId(pAttrValue);
@@ -615,18 +615,18 @@ ManifestHandler::OnResolutionStartElement(void)
pAttrValue1 = pAttr->Find("MimeType");
pAttrValue2 = pAttr->Find("UriScheme");
- __pAppControlResolutionInfoImpl = new _AppControlResolutionInfoImpl;
+ __pAppControlResolutionInfoImpl = new (std::nothrow) _AppControlResolutionInfoImpl;
TryReturn(__pAppControlResolutionInfoImpl, false, "[osp-installer] __pAppControlResolutionInfoImpl is null");
if (pAttrValue1)
{
- String* pMimeType = new String(pAttrValue1);
+ String* pMimeType = new (std::nothrow) String(pAttrValue1);
__pAppControlResolutionInfoImpl->SetMimeType(pMimeType);
}
if (pAttrValue2)
{
- String* pUriScheme = new String(pAttrValue2);
+ String* pUriScheme = new (std::nothrow) String(pAttrValue2);
__pAppControlResolutionInfoImpl->SetUriScheme(pUriScheme);
}
@@ -669,7 +669,7 @@ ManifestHandler::OnDataControlStartElement(void)
pProviderId = pAttr->Find("ProviderId");
TryReturn(pProviderId, true, "[osp-installer] pProviderId is null");
- __pDataControlInfoImpl = new _DataControlInfoImpl;
+ __pDataControlInfoImpl = new (std::nothrow) _DataControlInfoImpl;
TryReturn(__pDataControlInfoImpl, false, "[osp-installer] __pDataControlInfoImpl is null");
__pDataControlInfoImpl->SetProviderId(pProviderId);
@@ -682,7 +682,7 @@ ManifestHandler::OnDataControlStartElement(void)
bool
ManifestHandler::OnContentsStartElement(void)
{
- __pContentInfoList = new ArrayList;
+ __pContentInfoList = new (std::nothrow) ArrayList;
TryReturn(__pContentInfoList, false, "[osp-installer] __pContentInfoList is null");
AppLogTag(OSP_INSTALLER, "<Contents>");
@@ -698,7 +698,7 @@ ManifestHandler::OnContentStartElement(void)
XmlAttribute *pAttr = null;
char *pDefault = null;
- __pContentInfo = new ContentInfo;
+ __pContentInfo = new (std::nothrow) ContentInfo;
TryReturn(__pContentInfo, false, "[osp-installer] __pLiveboxInfo is null");
pAttr = GetAttribute();
@@ -733,7 +733,7 @@ ManifestHandler::OnContentStartElement(void)
bool
ManifestHandler::OnLiveBoxesStartElement(void)
{
- __pLiveBoxList = new ArrayList;
+ __pLiveBoxList = new (std::nothrow) ArrayList;
TryReturn(__pLiveBoxList, false, "[osp-installer] __pLiveBoxList is null");
AppLogTag(OSP_INSTALLER, "<LiveBoxes>");
@@ -751,7 +751,7 @@ ManifestHandler::OnLiveBoxStartElement(void)
char *pPopupEnabled = null;
char *pName = null;
- __pLiveboxInfo = new LiveboxInfo;
+ __pLiveboxInfo = new (std::nothrow) LiveboxInfo;
TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
pAttr = GetAttribute();
@@ -1085,7 +1085,7 @@ ManifestHandler::OnApiVersionValue(const char *pCharacters)
bool
ManifestHandler::OnPrivilegeValue(const char *pCharacters)
{
- __pPrivilegeList->Add(*new String(pCharacters));
+ __pPrivilegeList->Add(*new (std::nothrow) String(pCharacters));
AppLogTag(OSP_INSTALLER, "<Privilege>%s</Privilege>", pCharacters);
return true;
@@ -1194,17 +1194,17 @@ ManifestHandler::OnNameValue(const char *pCharacters)
{
TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
- String* pValue = new String;
+ String* pValue = new (std::nothrow) String;
StringUtil::Utf8ToString(pCharacters, *pValue);
- __pLiveboxInfo->AddName(*(new String(pAttrValue)), *pValue);
+ __pLiveboxInfo->AddName(*(new (std::nothrow) String(pAttrValue)), *pValue);
}
else if (FindElement("Content") == true)
{
TryReturn(__pContentInfo, false, "[osp-installer] __pContentInfo is null");
- String* pValue = new String;
+ String* pValue = new (std::nothrow) String;
StringUtil::Utf8ToString(pCharacters, *pValue);
- __pContentInfo->AddName(*(new String(pAttrValue)), *pValue);
+ __pContentInfo->AddName(*(new (std::nothrow) String(pAttrValue)), *pValue);
}
else
{
@@ -1218,9 +1218,9 @@ ManifestHandler::OnNameValue(const char *pCharacters)
if (__pPackageAppInfoImpl)
{
- String* pValue = new String;
+ String* pValue = new (std::nothrow) String;
StringUtil::Utf8ToString(pCharacters, *pValue);
- __pPackageAppInfoImpl->AddName(*(new String(pAttrValue)), *pValue);
+ __pPackageAppInfoImpl->AddName(*(new (std::nothrow) String(pAttrValue)), *pValue);
}
}
@@ -1264,7 +1264,7 @@ ManifestHandler::OnDataControlTypeValue(const char *pCharacters)
pAccessValue = pAttr->Find("Access");
TryReturn(pAccessValue, true, "[osp-installer] pAccessValue is null");
- __pDataControlTypeImpl = new _DataControlTypeImpl;
+ __pDataControlTypeImpl = new (std::nothrow) _DataControlTypeImpl;
TryReturn(__pDataControlTypeImpl, false, "[osp-installer] __pDataControlTypeImpl is null");
__pDataControlTypeImpl->SetType(pCharacters);
@@ -1287,7 +1287,7 @@ ManifestHandler::OnConditionValue(const char *pCharacters)
pName = pAttr->Find("Name");
TryReturn(pName, true, "[osp-installer] pName is null");
- __pLaunchConditionImpl = new _LaunchConditionInfoImpl;
+ __pLaunchConditionImpl = new (std::nothrow) _LaunchConditionInfoImpl;
TryReturn(__pLaunchConditionImpl, false, "[osp-installer] __pLaunchConditionImpl is null");
__pLaunchConditionImpl->SetName(pName);
@@ -1310,7 +1310,7 @@ ManifestHandler::OnNotificationValue(const char *pCharacters)
pName = pAttr->Find("Name");
TryReturn(pName, true, "[osp-installer] pName is null");
- __pNotificationImpl = new _NotificationInfoImpl;
+ __pNotificationImpl = new (std::nothrow) _NotificationInfoImpl;
TryReturn(__pNotificationImpl, false, "[osp-installer] __pNotificationImpl is null");
__pNotificationImpl->SetName(pName);
@@ -1326,7 +1326,7 @@ ManifestHandler::OnSizeValue(const char *pCharacters)
{
TryReturn(__pLiveboxInfo, false, "[osp-installer] __pLiveboxInfo is null");
- __pLiveboxInfo->AddSize(*(new String(pCharacters)));
+ __pLiveboxInfo->AddSize(*(new (std::nothrow) String(pCharacters)));
AppLogTag(OSP_INSTALLER, "<Size>%s</Size>", pCharacters);
return true;
@@ -1353,7 +1353,7 @@ ManifestHandler::OnCategoryValue(const char *pCharacters)
{
TryReturn(__pAppData, false, "[osp-installer] __pAppData is null");
- __pAppData->__pCategoryList->Add(new String(pCharacters));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String(pCharacters));
return true;
}
@@ -1407,7 +1407,7 @@ ManifestHandler::FindElement(const char *pName)
bool
ManifestHandler::AddAppFeature(const Tizen::Base::String& name, const Tizen::Base::String& value)
{
- _AppFeatureInfoImpl* pAppFeatureInfo = new _AppFeatureInfoImpl;
+ _AppFeatureInfoImpl* pAppFeatureInfo = new (std::nothrow) _AppFeatureInfoImpl;
TryReturn(pAppFeatureInfo, false, "[osp-installer] pAppFeatureInfo is null");
pAppFeatureInfo->SetName(name);
@@ -1478,15 +1478,15 @@ ManifestHandler::ParseAppAttribute(XmlAttribute* pAttr, bool isUiApp)
if (strcasecmp(pCategory, "home-screen") == 0)
{
- __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/homescreen"));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String("http://tizen.org/category/homescreen"));
}
else if (strcasecmp(pCategory, "lock-screen") == 0)
{
- __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/lockscreen"));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String("http://tizen.org/category/lockscreen"));
}
else if (strcasecmp(pCategory, "Ime") == 0)
{
- __pAppData->__pCategoryList->Add(new String("http://tizen.org/category/ime"));
+ __pAppData->__pCategoryList->Add(new (std::nothrow) String("http://tizen.org/category/ime"));
}
CategoryType categoryType = InstallerUtil::GetCategoryType(pCategory);