* lib/getopt.c (process_long_option): Don't set ambig_set[option_index]
if ambig_set is &ambig_fallback.
+2024-01-17 Bruno Haible <bruno@clisp.org>
+
+ getopt-gnu: Fix out-of-bounds access (regression 2023-12-11).
+ * lib/getopt.c (process_long_option): Don't set ambig_set[option_index]
+ if ambig_set is &ambig_fallback.
+
2024-01-16 Paul Eggert <eggert@cs.ucla.edu>
posixtm: pacify clang 18
ambig_set[indfound] = 1;
}
}
- if (ambig_set)
+ if (ambig_set && ambig_set != &ambig_fallback)
ambig_set[option_index] = 1;
}
}