bryancall opened a new pull request, #14148: URL: https://github.com/apache/trafficserver/pull/14148
Five independent fixes. plugin.config: plugin_init() accepts up to MAX_PLUGIN_ARGS tokens on a line, but argv had only that many slots, so on a full line the terminating nullptr overwrote the last token while argc still counted it. The plugin lost its last argument and getopt_long() saw a nullptr inside argv. argv now has a slot for the terminator, and the limit is checked only once another token is found, so a full line no longer logs "Exceeded max number of args". Two Uranium tests load xdebug with the token that enables X-Cache last: one from a full line, which must not warn, and one from a line with a token too many, which must keep that token and warn. SSLConfigParams: the TLS version bounds, clientCertExitOnLoadError and alpn_protocols_array were set only by initialize(). Unit tests build the object directly and pass it to the context loaders, which then used whatever the stack held. The bounds now default to -1, the records default, and the other two to zero. A unit test constructs the object over a fill pattern. Bravo: _revoke() backed off with a sleep of 1 << j nanoseconds and no limit on j, so a reader that held its slot for about two seconds pushed the shift to the width of int. The backoff now stops doubling at about a millisecond and polls at that interval. SimpleTokenizer: with CONSIDER_NULL_FIELDS, trimming an empty field could step back past the start of the token: off the front of the data for a leading field, and into the whitespace after the previous token for one in the middle of a line, which left the field unterminated. Both trims now stop at the token's first character. Nothing in the tree uses that mode today; a unit test covers both cases. TCP Fast Open probe: read_uint_from_fd() tested if (fd), which is true for the -1 that open() returns when the /proc entry is missing, so it went on to read(-1). It now checks for a valid descriptor. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
