Re: svn commit: r1920247 - /apr/apr/trunk/ldap/apr_ldap.c

Yann Ylavic <[email protected]> Wed, 28 Aug 2024 13:38:08 +0200
Newsgroups gmane.comp.apache.apr.devel
Message-ID <CAKQ1sVPK7wswHruZ36G-srJCxED4TzXjmMcvTY=1BQ-2zmLoVg@mail.gmail.com>
On Wed, Aug 28, 2024 at 12:41 PM <[email protected]> wrote:
>
> --- apr/apr/trunk/ldap/apr_ldap.c (original)
> +++ apr/apr/trunk/ldap/apr_ldap.c Wed Aug 28 10:41:28 2024
> @@ -1568,16 +1568,32 @@ APU_DECLARE_LDAP(apr_status_t) apr_ldap_
>
>                  if (vals) {
>
> -                    int k, nvals;
> +                    int k, nvals, binary = 0;
> +
> +                    char *sc = attr;
> +
> +                    /* support for RFC4522 binary encoding option */
> +                    while ((sc = strchr(sc, ';'))) {
> +                        if (!strcasecmp(sc, ";binary") && (sc[7] == 0 || sc[7] == ';')) {

strncasecmp(..., 7) or even apr_cstr_casecmpn() which does not depend
on the locale?

> +                            binary = 1;
> +                            break;
> +                        }

sc++ ?

> +                    }


Regards;
Yann.