Files
coreutils/src
Paul Eggert e3766c5db1 env: simplify --split-string memory management
* bootstrap.conf (gnulib_modules): Add idx.
* src/env.c: Include idx.h, minmax.h.
Prefer idx_t to ptrdiff_t when values are nonnegative.
(valid_escape_sequence, escape_char, validate_split_str)
(CHECK_START_NEW_ARG):
Remove; no longer needed now that we validate as we go.
(struct splitbuf): New type.
(splitbuf_grow, splitbuf_append_byte, check_start_new_arg)
(splitbuf_finishup): New functions.
(build_argv): New arg ARGC.  Validate and process in one go, using
the new functions; this is simpler and more reliable than the old
approach (as witness the recent bug).  Avoid integer overflow in
the unlikely case where the string contains more than INT_MAX
arguments.
(parse_split_string): Simplify by exploiting the new build_argv.
2021-03-29 21:44:58 -07:00
..
2020-02-25 13:51:21 +00:00
2021-03-24 16:47:50 -07:00
2008-11-20 10:21:52 +01:00
2021-01-26 09:24:41 -08:00
2005-07-18 07:52:37 +00:00
2019-05-11 13:55:54 -07:00
2021-03-25 11:21:15 -07:00
2003-07-06 06:08:40 +00:00
2021-03-24 17:00:46 -07:00
2021-03-25 09:19:02 -07:00
…
…
…
2021-03-21 14:01:15 -07:00
2007-07-10 19:00:00 +02:00
2007-07-10 19:00:00 +02:00