]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/ldapsync.c
Additional fix for ITS#4522. The "dn=" ist not optional.
[openldap] / servers / slapd / ldapsync.c
index e2037811910ce622db318fd55ae87e720fb0cb0c..7d9b9cf20e76bc1f7319cfdaa262973f8787c4c1 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2005 The OpenLDAP Foundation.
+ * Copyright 2003-2006 The OpenLDAP Foundation.
  * Portions Copyright 2003 IBM Corporation.
  * All rights reserved.
  *
@@ -112,9 +112,11 @@ slap_parse_sync_cookie(
                || rid_ptr > &cookie->octet_str.bv_val[ cookie->octet_str.bv_len - STRLENOF( "rid=" ) ] )
        {
                return -1;
-
        }
 
+       if ( rid_ptr[ STRLENOF( "rid=" ) ] == '-' ) {
+               return -1;
+       }
        cookie->rid = strtoul( &rid_ptr[ STRLENOF( "rid=" ) ], &next, 10 );
        if ( next == &rid_ptr[ STRLENOF( "rid=" ) ] || ( next[ 0 ] != ',' && next[ 0 ] != '\0' ) ) {
                return -1;