Re: [PATCH v1 1/2] enter.c: Use wmem*() functions with wide-character strings

Alejandro Colomar via Mutt-dev <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <aY8pDuycuc_DtjAJ@devuan>
Hi Kevin,

On 2026-02-13T11:17:34+0800, Kevin J. McCarthy wrote:
> On Thu, Feb 12, 2026 at 11:56:19PM +0100, Alejandro Colomar via Mutt-dev wrote:
> > This avoids an explicit size multiplication, which can overflow the
> > calculation.
> 
> My concern is the conversation in the other thread about wc support, and
> portability, and --without-wc-funcs.  Otherwise this looks fine.

Ok; let's wait till that's settled.  I should also change the commit
message, per what Greg said.

> 
> > diff --git a/enter.c b/enter.c
> > index 54e81178b3c5..ba8b9963659c 100644
> > --- a/enter.c
> > +++ b/enter.c
> > @@ -29,6 +29,7 @@
> > #include "buffy.h"
> > 
> > #include <string.h>
> > +#include <wchar.h>
> 
> In mutt, this is already covered by #include "mutt.h".

Ahh, ok.


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmmPKX4ACgkQ64mZXMKQ
wqnnvw//YjVnMjNedqNy8KZLZEsBdI1xnNTxroZanHv4H6RIm+GFFrs4M+m7ereb
VhOlmMKDHUJ7gAALTtoIl5Kp2rPeO5m6j3kKL+FB6Gay/FJyMxGYJQEQJoLRkK3N
Y79kljAXhKxTfD5aUoQrh+SH2VjtogP5rna2cXHqQPJvWpKNAw9CZCJpWoz4XSof
XGGrbFVQkzw7uCa1v8tks5jtLo//+sOymRGJ8rKQgIB/3YvG5JA3INiM/om4yoUg
Sj1wq8cbcm49xxJQrdIdHm/uxKMRL98yDeyivq0PLYRTh3uT+M7qjFlaay2XnQzZ
rCJtJv4N3B0JnBJgXyGKvlrxr8EMSNRCNurjYT9E+MJovyxQXYR+rBb8LQQdCsPf
xVzZZ6CcAFvxSW2PC4T8b5pyyf3irVwMwlvk0W/C8t6IepeNlJoEqUURGYCONBkF
Y+7P2t1+l4nuOJc4xL9qen1+y5RoQwGAbSLvj5cgsWPVvaIqkvOz6t2FnhbKSQCC
Xh8BRFyC+k7U3JjLgtNaBsQ3FdssvTLxcg+F5wYMlceIkweAddjtv6gk1lAZU4vZ
LXfsw0FAhyobBKLSFW/XHonXEWf4Uz9dcMbX/iWC+4Q50ux33kGG0D5fgmRpy4jy
ZWZRpDB0BGQgtLT9lXxK43fmblLWu55/RpIXbv+P9OA4Nnzoezk=
=zB2u
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.