From: Michael Chase-S. <mc...@us...> - 2011-03-31 01:25:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via f4af1a9c107500036415863845319d6bcd77d78f (commit) from f39cf6391b093ba6d0c997828b803baa5adc6955 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f4af1a9c107500036415863845319d6bcd77d78f Author: Michael Chase-Salerno <br...@li...> Date: Wed Mar 30 21:24:39 2011 -0400 3206663 Enum CQL filter on NULL cause segfault and incorrect rsp ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 7a27fbe..56a4108 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-30 Michael Chase-Salerno <br...@li...> + * queryOperation.c + [ 3206663 ] Enum CQL filter on NULL cause segfault and incorrect rsp + (based on patch by cpoblete) + 2011-03-30 Chris Buccella <buc...@li...> * interopProvider.c, indCIMXMLHandler.c: diff --git a/NEWS b/NEWS index 72b50cd..f2bce31 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ Bugs fixed: - 3177707 ExecQuery 1 to 4 tests segfault on power LPAR - 3185034 exec query test failures on power - char16 mismatch - 2990315 cmciRelease not called in case of error +- 3206663 Enum CQL filter on NULL cause segfault and incorrect rsp Changes in 1.4.0 ================ diff --git a/queryOperation.c b/queryOperation.c index 39f3162..2c04139 100644 --- a/queryOperation.c +++ b/queryOperation.c @@ -230,6 +230,14 @@ charsCompare(QLOperand * self, QLOperand * op, QLPropertySource * src) else ov = op->charsVal; + if (sov == NULL || ov == NULL) { + if (sov == NULL && ov == NULL) + return 0; // both null + if (sov == NULL) + return -1; // left only null + return 1; // right only null + } + if (type == QL_Chars) return strcmp(sov, ov); return -2; @@ -299,7 +307,19 @@ propCompare(QLOperand * self, QLOperand * op, QLPropertySource * src) ; // what should we do here ? } - rc = nop->ft->compare(nop, op, src); + if (nop) { + rc=nop->ft->compare(nop,op,src); + } else { + rc=-2; + if ((type == QL_Null) && (op->type == QL_PropertyName)) { + // both are property names + v=getPropValue(op, src, &type); + if (type == QL_Null) { + rc=0; // both are NULL, a match + } + } + } + QL_TRACE(fprintf (stderr, "propCompare(%s) %d\n", self->propertyName->propName, rc)); diff --git a/test/xmltest/execQuerySeg01.lines b/test/xmltest/execQuerySeg01.lines new file mode 100644 index 0000000..ecfc3f7 --- /dev/null +++ b/test/xmltest/execQuerySeg01.lines @@ -0,0 +1 @@ +!exiting due to a SIGSEGV signal diff --git a/test/TestProviders/tests/execQuery.xml b/test/xmltest/execQuerySeg01.xml similarity index 80% copy from test/TestProviders/tests/execQuery.xml copy to test/xmltest/execQuerySeg01.xml index a44675e..c3d8863 100644 --- a/test/TestProviders/tests/execQuery.xml +++ b/test/xmltest/execQuerySeg01.xml @@ -8,13 +8,12 @@ <NAMESPACE NAME="cimv2"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="QueryLanguage"> -<VALUE>WQL</VALUE> +<VALUE>CQL</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="Query"> -<VALUE>SELECT ElementName,n16,n64,s32,s8 FROM Test_Query </VALUE> +<VALUE>SELECT * FROM CIM_ComputerSystem WHERE instanceId='embedded'</VALUE> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM> - diff --git a/test/xmltest/execQuerySeg02.lines b/test/xmltest/execQuerySeg02.lines new file mode 100644 index 0000000..ecfc3f7 --- /dev/null +++ b/test/xmltest/execQuerySeg02.lines @@ -0,0 +1 @@ +!exiting due to a SIGSEGV signal diff --git a/test/TestProviders/tests/execQuery.xml b/test/xmltest/execQuerySeg02.xml similarity index 80% copy from test/TestProviders/tests/execQuery.xml copy to test/xmltest/execQuerySeg02.xml index a44675e..d60e1aa 100644 --- a/test/TestProviders/tests/execQuery.xml +++ b/test/xmltest/execQuerySeg02.xml @@ -8,13 +8,12 @@ <NAMESPACE NAME="cimv2"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="QueryLanguage"> -<VALUE>WQL</VALUE> +<VALUE>CQL</VALUE> </IPARAMVALUE> <IPARAMVALUE NAME="Query"> -<VALUE>SELECT ElementName,n16,n64,s32,s8 FROM Test_Query </VALUE> +<VALUE>SELECT * FROM CIM_ComputerSystem WHERE instanceId=Description</VALUE> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM> - hooks/post-receive -- SFCB - Small Footprint CIM Broker |