projects
/
platform
/
core
/
appfw
/
wgt-backend.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99de35b
)
Fix static analysis issue
02/281802/1
author
Ilho Kim
<ilho159.kim@samsung.com>
Thu, 22 Sep 2022 05:13:39 +0000
(14:13 +0900)
committer
Ilho Kim
<ilho159.kim@samsung.com>
Thu, 22 Sep 2022 05:13:57 +0000
(14:13 +0900)
- Null pointer dereference
Change-Id: Ie3dda3872cf472d9c3a76a4b1f7738d6725bb5c6
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/hybrid/step/pkgmgr/step_merge_xml.cc
patch
|
blob
|
history
diff --git
a/src/hybrid/step/pkgmgr/step_merge_xml.cc
b/src/hybrid/step/pkgmgr/step_merge_xml.cc
index
8b6fbb3
..
4a3cd7d
100644
(file)
--- a/
src/hybrid/step/pkgmgr/step_merge_xml.cc
+++ b/
src/hybrid/step/pkgmgr/step_merge_xml.cc
@@
-98,6
+98,10
@@
xmlNodePtr StepMergeXml::GetXmlNode(const xmlDocPtr doc,
void StepMergeXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) {
xmlNodePtr last = xmlGetLastChild(node1);
+ if (!last) {
+ LOG(ERROR) << "Failed to get last child node";
+ return;
+ }
xmlNodePtr next;
// merge node2's child into node1
for (xmlNodePtr cur = node2->children; cur; cur = next) {