bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex module broken


From: Mark D. Baushke
Subject: Re: regex module broken
Date: Thu, 13 Apr 2006 16:01:58 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Paul,

Your patch fixes things for FreeBSD 4.11-RELEASE.

        Thank you,
        -- Mark

Paul Eggert <address@hidden> writes:

> "Derek R. Price" <address@hidden> writes:
> 
> > The base problem appears to be using the C99 wctype_t
> > without protection when <wctype.h> may not have been present and
> > therefore not included.
> 
> Thanks for reporting that.  I installed the following patch into gnulib
> (and shortly into coreutils).
> 
> 2006-04-13  Paul Eggert  <address@hidden>
> 
>       * regcomp.c (init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N
>       is not defined.  Problem reported by Mark D. Baushke via Derek R. Price.
> 
> --- lib/regcomp.c     10 Apr 2006 19:15:08 -0000      1.7
> +++ lib/regcomp.c     13 Apr 2006 22:11:29 -0000
> @@ -836,15 +836,17 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
>  #ifndef _LIBC
>    char *codeset_name;
>  #endif
> +#ifdef RE_ENABLE_I18N
> +  size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
> +#else
> +  size_t max_i18n_object_size = 0;
> +#endif
>    size_t max_object_size =
>      MAX (sizeof (struct re_state_table_entry),
>        MAX (sizeof (re_token_t),
>             MAX (sizeof (re_node_set),
>                  MAX (sizeof (regmatch_t),
> -                     MAX (sizeof (regoff_t),
> -                          MAX (sizeof (wchar_t),
> -                               MAX (sizeof (wctype_t),
> -                                    sizeof (Idx))))))));
> +                     max_i18n_object_size))));
>  
>    memset (dfa, '\0', sizeof (re_dfa_t));
>  
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEPthmCg7APGsDnFERAt1AAKDbWmOHUsOFXr503YBpAsA+iWqcCQCgzD4d
w9NxI0B6kmUvGqrQdUmblHs=
=ctI9
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]