syncrepl.c accepts rids up to SLAP_SYNC_SID_MAX = 4095, rather than up to SLAP_SYNC_RID_MAX = 999. Also I suppose SLAPD_SYNC_SYNCCONN_OFFSET should be -SLAP_SYNC_RID_MAX-1, so that constant is only hardcoded once. (I don't know what a rid and a sid actually is though.)