The current code fixes the guessed variable width according to
input constraints. But the data output stages checks the
width against output constraints. The minimum width for FMT_E
is 1 for input and 6 for output. When the guesser proposes FMT_E
with width 5, then 5 is chosen. With this patch, the width is
fixed to 6.
Thanks to Fatemeh Ilkhani for reporting the bug and providing a
csv that triggers the crash.
Closes: https://savannah.gnu.org/bugs/?66456
{
struct fmt_spec fs = fmt_guesser_guess (fg[i]);
- fmt_fix (&fs, FMT_FOR_INPUT);
+ fmt_fix (&fs, FMT_FOR_OUTPUT);
struct variable *var = dict_get_var (ia->dict, i);