Skip to content

Commit

Permalink
generateYCPWrappers: check also for YCPNull to avoid segfault
Browse files Browse the repository at this point in the history
when a parameter is missing (bnc#846467)

- 3.0.3
  • Loading branch information
lslezak committed Oct 21, 2013
1 parent e56068a commit 3888ac8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.0.2
3.0.3
2 changes: 1 addition & 1 deletion base/tools/devtools/generateYCPWrappers
Expand Up @@ -82,7 +82,7 @@ while (@exports)
push (@tests, "// m_param$paramcount may be nil");
}
else {
push (@tests, "if (m_param$paramcount->isVoid()) {ycp2error(\"Parameter %d is nil, %s is required\", $paramcount, \"$type\"); return YCPVoid();}");
push (@tests, "if (m_param$paramcount.isNull() || m_param$paramcount->isVoid()) {ycp2error(\"Parameter %d is nil, %s is required\", $paramcount, \"$type\"); return YCPVoid();}");

}
$type = "m_param" . $paramcount . "->as" . $type . "()" ;
Expand Down
7 changes: 7 additions & 0 deletions package/yast2-core.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Oct 21 14:02:54 UTC 2013 - lslezak@suse.cz

- generateYCPWrappers: check also for YCPNull to avoid segfault
when a parameter is missing (bnc#846467)
- 3.0.3

-------------------------------------------------------------------
Tue Oct 1 14:59:08 UTC 2013 - jreidinger@suse.com

Expand Down

0 comments on commit 3888ac8

Please sign in to comment.