Re: Fwd: report 1/3: buffer under-read in rfc2047.c lwslen()
"Kevin J. McCarthy" <[email protected]> Mon, 22 Jun 2026 10:02:44 +0800
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jun 21, 2026 at 06:02:06PM +0200, Alejandro Colomar via Mutt-dev wrote: >On 2026-06-21T17:31:38+0200, Vincent Lefevre wrote: >> On 2026-06-20 22:48:38 +0200, Alejandro Colomar via Mutt-dev wrote: >> > Comparison with a literal should not use casts. >> >> OK here, but why is there a cast for the assignment, then? >> >> If the cast is useless for the comparison, then it should also >> be useless for the assignment. > >Agree. I'd remove it. I'd remove most casts in any program, FWIW, and >wrap all the few remaining necessary ones in macros that make them easy >to grep and verify. > >In this case, I'd remove the cast in the assignment. I pushed this commit up over the weekend. However, if someone wants to clean up the unneeded casts in the function, I'll commit it too. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmo4l8QACgkQre92hIAx a9rtrBAAqfpKGk0mdjQJAl/H8Swewb0B1H2ljKSXIVefzDytDP05MYlCSf3Vq8TX 9FqkINFj6RY21ADGLX6ZJ8mhOy87QJ6gIHb8omeOLgoJdAXikPBccqJofOuko2bC ielJzlGuMXuh+wwZVB83j4AX7M0Q5LuovAlkb9AsQfq3gRLR6Y66EnttLJUovnDp CRtzH+b26rOgY2W8VLhVLJR8bLSt6FpE4Mbd2x//q7N4pPGtVAsOwJ5155rBzJIg rM5/NHNeONLmCh6UCQ3aTVnyrlurzIMfxcM7v/ja/gjH+ljgBX6wzmmutsxnXe0N KVLJWdFqb2r0JE/9dpfLPEWhQC5h6KxRpWMEaAy3CZhoq944tGhxofFK6fon6yCm cL7KJgNMjeaAVr/bKjTo4NerF8N6WK58nJXg3ZQPcynCWTNmiui61yv7krfk8a/U nwjSfDYuYgdxXbvFUi3uy0bgo5ADw6g5y/yE7Ssc4CH7FcE78V4F5wTIGN9CS5hT 1WYnKr3KQLBzkbBSNFmrvECLO6hzNSPco/rUUnF7lL0h5dBdFw2KaWTWz+2yUIJ0 gQX8cc4c/ThmfsqhW4uowzTnhEo0jc9Nw/daGb6vTSRGzUlLXC6YOmarwoEEKPea 1f9e1H0wWHnQg6Tg4QRY1zjnTe5cGEaenbFDY2tEIFHCISZrtkg= =Liqy -----END PGP SIGNATURE-----