summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2008-12-05 23:57:49 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2008-12-05 23:57:49 +0000
commitc8bfd0cd85c3ec59e3fe90c2cf122f984db8288f (patch)
tree3cfd5ec39e160e73cf0797934180651b446dd9a6
parent0253cf3cca45f65caaeabfe886a41da5de916bdc (diff)
downloadds-c8bfd0cd85c3ec59e3fe90c2cf122f984db8288f.tar.gz
ds-c8bfd0cd85c3ec59e3fe90c2cf122f984db8288f.tar.xz
ds-c8bfd0cd85c3ec59e3fe90c2cf122f984db8288f.zip
Resolves: 459433
Summray: MMR: intensive conflict test crashes the server Description: values2keys functions in the syntax plugin did not check the existence of the input and output variable.
-rw-r--r--ldap/servers/plugins/syntaxes/bin.c8
-rw-r--r--ldap/servers/plugins/syntaxes/string.c9
2 files changed, 14 insertions, 3 deletions
diff --git a/ldap/servers/plugins/syntaxes/bin.c b/ldap/servers/plugins/syntaxes/bin.c
index 1ae58a9f..6d6c7632 100644
--- a/ldap/servers/plugins/syntaxes/bin.c
+++ b/ldap/servers/plugins/syntaxes/bin.c
@@ -186,6 +186,14 @@ bin_values2keys( Slapi_PBlock *pb, Slapi_Value **bvals,
{
int i;
+ if (NULL == ivals) {
+ return 1;
+ }
+ *ivals = NULL;
+ if (NULL == bvals) {
+ return 1;
+ }
+
if ( ftype != LDAP_FILTER_EQUALITY ) {
return( LDAP_PROTOCOL_ERROR );
}
diff --git a/ldap/servers/plugins/syntaxes/string.c b/ldap/servers/plugins/syntaxes/string.c
index 3142491b..138d98af 100644
--- a/ldap/servers/plugins/syntaxes/string.c
+++ b/ldap/servers/plugins/syntaxes/string.c
@@ -357,9 +357,12 @@ string_values2keys( Slapi_PBlock *pb, Slapi_Value **bvals,
Slapi_Value **bvlp;
char *w, *c, *p;
+ if (NULL == ivals) {
+ return 1;
+ }
+ *ivals = NULL;
if (NULL == bvals) {
- *ivals = NULL;
- return 0;
+ return 1;
}
switch ( ftype ) {
@@ -435,7 +438,7 @@ string_values2keys( Slapi_PBlock *pb, Slapi_Value **bvals,
* nsSubStrEnd: 2
* [...]
*
- * By default, begin == 2, middle == 3, end == 2 (defined in syntax.h)
+ * By default, begin == 3, middle == 3, end == 3 (defined in syntax.h)
*/
/* If nsSubStrLen is specified in each index entry,