]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9352 syncrepl: fix syncrepl_op_modify on entry with no entryCSN
authorHoward Chu <hyc@openldap.org>
Thu, 17 Sep 2020 19:18:20 +0000 (20:18 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 17 Sep 2020 20:03:30 +0000 (20:03 +0000)
servers/slapd/syncrepl.c

index ba37f1e5813755a0e02206827f3339a32740eeff..eedc24abbe976a4fc246b0562d20aa42bbaaf9b5 100644 (file)
@@ -2242,10 +2242,15 @@ syncrepl_op_modify( Operation *op, SlapReply *rs )
                Attribute *a;
                const char *text;
                a = attr_find( e->e_attrs, slap_schema.si_ad_entryCSN );
-               value_match( &match, slap_schema.si_ad_entryCSN,
-                       slap_schema.si_ad_entryCSN->ad_type->sat_ordering,
-                       SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
-                       &mod->sml_nvalues[0], &a->a_nvals[0], &text );
+               if ( a ) {
+                       value_match( &match, slap_schema.si_ad_entryCSN,
+                               slap_schema.si_ad_entryCSN->ad_type->sat_ordering,
+                               SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
+                               &mod->sml_nvalues[0], &a->a_nvals[0], &text );
+               } else {
+                       /* no entryCSN? shouldn't happen. assume mod is newer. */
+                       match = 1;
+               }
                overlay_entry_release_ov( op, e, 0, on );
        }
        /* equal? Should never happen */