On 9/19/24 1:39 AM, Stephane Chazelas wrote:
Looks like printf(3) gets called with a `Lf' conversation specifier and a double argument.Yes, I came to the same conclusion with an essentially identical fix.[...] Would it be possible to have a 5.2 patch released with the backport of those two fixes?
Sure, when I get a chance I'll do the patch engineering. Here's what it
will be.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
*** ../bash-20231106/configure.ac Fri Aug 11 14:52:31 2023
--- configure.ac Tue Nov 21 12:00:25 2023
***************
*** 899,903 ****
[AC_LANG_PROGRAM(
[[#include <stdlib.h>]],
! [[long double r; char *foo, bar; r = strtold(foo, &bar);]]
)],
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
--- 900,904 ----
[AC_LANG_PROGRAM(
[[#include <stdlib.h>]],
! [[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
)],
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
*** ../bash-20231106/configure Fri Aug 18 16:27:53 2023
--- configure Tue Nov 21 12:00:30 2023
***************
*** 15923,15927 ****
main (void)
{
! long double r; char *foo, bar; r = strtold(foo, &bar);
;
--- 15932,15936 ----
main (void)
{
! long double r; char *foo, *bar; r = strtold(foo, &bar);
;
*** ../bash-5.2-patched/builtins/printf.def Fri Jun 24 10:09:50 2022
--- builtins/printf.def Tue Aug 13 10:36:55 2024
***************
*** 710,714 ****
p = getfloatmax ();
! f = mklong (start, "L", 1);
PF (f, p);
}
--- 710,714 ----
p = getfloatmax ();
! f = mklong (start, FLOATMAX_CONV, USE_LONG_DOUBLE);
PF (f, p);
}
OpenPGP_signature.asc
Description: OpenPGP digital signature
