xref: /openbsd/usr.bin/awk/FIXES (revision 9e6efb0a)
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this
9permission notice and warranty disclaimer appear in supporting
10documentation, and that the name Lucent Technologies or any of
11its entities not be used in advertising or publicity pertaining
12to distribution of the software without specific, written prior
13permission.
14
15LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
22THIS SOFTWARE.
23****************************************************************/
24
25This file lists all bug fixes, changes, etc., made since the
26second edition of the AWK book was published in September 2023.
27
28May 4, 2024
29	Fixed a use-after-free bug with ARGV for "delete ARGV".
30	Also ENVtab is no longer global. Thanks to Benjamin Sturz
31	for spotting the ARGV issue and	Todd Miller for the fix.
32
33May 3, 2024:
34	Remove warnings when compiling with g++. Thanks to Arnold Robbins.
35
36Apr 22, 2024:
37	Fixed regex engine gototab reallocation issue that was
38	Introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
39	Fixed a scan bug in split in the case the separator is a single
40	character. Thanks to Oguz Ismail for spotting the issue.
41
42Mar 10, 2024:
43	Fixed use-after-free bug in fnematch due to adjbuf invalidating
44	the pointers to buf. Thanks to github user caffe3 for spotting
45	the issue and providing a fix, and to Miguel Pineiro Jr.
46	for the alternative fix.
47	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
48	thanks to Miguel Pineiro Jr.
49
50Jan 22, 2024:
51	Restore the ability to compile with g++. Thanks to
52	Arnold Robbins.
53
54Dec 24, 2023:
55	Matchop dereference after free problem fix when the first
56	argument is a function call. Thanks to Oguz Ismail Uysal.
57	Fix inconsistent handling of --csv and FS set in the
58	command line. Thanks to Wilbert van der Poel.
59	Casting changes to int for is* functions.
60
61Nov 27, 2023:
62	Fix exit status of system on MacOS. Update to REGRESS.
63	Thanks to Arnold Robbins.
64	Fix inconsistent handling of -F and --csv, and loss of csv
65	mode when FS is set.
66
67Nov 24, 2023:
68        Fix issue #199: gototab improvements to dynamically resize the
69        table, qsort and bsearch to improve the lookup speed as the
70        table gets larger for multibyte input. Thanks to Arnold Robbins.
71
72Nov 23, 2023:
73	Fix Issue #169, related to escape sequences in strings.
74	Thanks to Github user rajeevvp.
75	Fix Issue #147, reported by Github user drawkula, and fixed
76	by Miguel Pineiro Jr.
77
78Nov 20, 2023:
79	Rewrite of fnematch to fix a number of issues, including
80	extraneous output, out-of-bounds access, number of bytes
81	to push back after a failed match etc.
82	Thanks to Miguel Pineiro Jr.
83
84Nov 15, 2023:
85	Man page edit, regression test fixes. Thanks to Arnold Robbins
86	Consolidation of sub and gsub into dosub, removing duplicate
87	code. Thanks to Miguel Pineiro Jr.
88	gcc replaced with cc everywhere.
89
90Oct 30, 2023:
91	Multiple fixes and a minor code cleanup.
92	Disabled utf-8 for non-multibyte locales, such as C or POSIX.
93	Fixed a bad char * cast that causes incorrect results on big-endian
94	systems. Also fixed an out-of-bounds read for empty CCL.
95	Fixed a buffer overflow in substr with utf-8 strings.
96	Many thanks to Todd C Miller.
97
98Sep 24, 2023:
99	fnematch and getrune have been overhauled to solve issues around
100	unicode FS and RS. Also fixed gsub null match issue with unicode.
101	Big thanks to Arnold Robbins.
102
103Sep 12, 2023:
104	Fixed a length error in u8_byte2char that set RSTART to
105	incorrect (cannot happen) value for EOL match(str, /$/).
106
107
108-----------------------------------------------------------------
109
110[This entry is a summary, not a precise list of changes.]
111
112	Added --csv option to enable processing of comma-separated
113	values inputs.  When --csv is enabled, fields are separated
114	by commas, fields may be quoted with " double quotes, fields
115	may contain embedded newlines.
116
117	If no explicit separator argument is provided, split() uses
118	the setting of --csv to determine how fields are split.
119
120	Strings may now contain UTF-8 code points (not necessarily
121	characters).  Functions that operate on characters, like
122	length, substr, index, match, etc., use UTF-8, so the length
123	of a string of 3 emojis is 3, not 12 as it would be if bytes
124	were counted.
125
126	Regular expressions are processed as UTF-8.
127
128	Unicode literals can be written as \u followed by one
129	to eight hexadecimal digits.  These may appear in strings and
130	regular expressions.
131