xref: /freebsd/contrib/one-true-awk/FIXES (revision dd78d987cb38ef162d40aad86229f1dc19884f78)
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
28Jan 14, 2025
29	Fix incorrect error line number issues. unput has
30	no business managing lineno. Thanks to Ozan Yigit.
31
32Jan 05, 2025
33	Fix hex detection in is_valid_number.
34	Fix indirect field specification with non-numeric string
35	eg. $("foo") in indirect. This is not illegal.
36	Thanks to Arnold Robbins.
37
38Jan 01, 2025
39	Fixed openfile to not try to read from a directory.
40	Thanks to Arnold Robbins.
41
42Jul 28, 2024
43	Fixed readcsvrec resize segfault when reading csv records longer
44	than 8k. Thanks to Ozan Yigit.
45	mktime() added to bsd-features branch. Thanks to Todd Miller.
46
47Jun 23, 2024
48	Fix signal for system-status test. Thanks to Tim van der Molen.
49	Rewrite if-else chain as switch. Thanks to Andrew Sukach.
50
51May 27, 2024
52	Spelling fixes and removal of unneeded prototypes and extern.
53	Thanks to Jonathan Gray.
54
55May 4, 2024
56	Fixed a use-after-free bug with ARGV for "delete ARGV".
57	Also ENVtab is no longer global. Thanks to Benjamin Sturz
58	for spotting the ARGV issue and	Todd Miller for the fix.
59
60May 3, 2024:
61	Remove warnings when compiling with g++. Thanks to Arnold Robbins.
62
63Apr 22, 2024:
64	Fixed regex engine gototab reallocation issue that was
65	Introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
66	Fixed a scan bug in split in the case the separator is a single
67	character. Thanks to Oguz Ismail for spotting the issue.
68
69Mar 10, 2024:
70	Fixed use-after-free bug in fnematch due to adjbuf invalidating
71	the pointers to buf. Thanks to github user caffe3 for spotting
72	the issue and providing a fix, and to Miguel Pineiro Jr.
73	for the alternative fix.
74	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
75	thanks to Miguel Pineiro Jr.
76
77Jan 22, 2024:
78	Restore the ability to compile with g++. Thanks to
79	Arnold Robbins.
80
81Dec 24, 2023:
82	Matchop dereference after free problem fix when the first
83	argument is a function call. Thanks to Oguz Ismail Uysal.
84	Fix inconsistent handling of --csv and FS set in the
85	command line. Thanks to Wilbert van der Poel.
86	Casting changes to int for is* functions.
87
88Nov 27, 2023:
89	Fix exit status of system on MacOS. Update to REGRESS.
90	Thanks to Arnold Robbins.
91	Fix inconsistent handling of -F and --csv, and loss of csv
92	mode when FS is set.
93
94Nov 24, 2023:
95        Fix issue #199: gototab improvements to dynamically resize the
96        table, qsort and bsearch to improve the lookup speed as the
97        table gets larger for multibyte input. Thanks to Arnold Robbins.
98
99Nov 23, 2023:
100	Fix Issue #169, related to escape sequences in strings.
101	Thanks to Github user rajeevvp.
102	Fix Issue #147, reported by Github user drawkula, and fixed
103	by Miguel Pineiro Jr.
104
105Nov 20, 2023:
106	Rewrite of fnematch to fix a number of issues, including
107	extraneous output, out-of-bounds access, number of bytes
108	to push back after a failed match etc.
109	Thanks to Miguel Pineiro Jr.
110
111Nov 15, 2023:
112	Man page edit, regression test fixes. Thanks to Arnold Robbins
113	Consolidation of sub and gsub into dosub, removing duplicate
114	code. Thanks to Miguel Pineiro Jr.
115	gcc replaced with cc everywhere.
116
117Oct 30, 2023:
118	Multiple fixes and a minor code cleanup.
119	Disabled utf-8 for non-multibyte locales, such as C or POSIX.
120	Fixed a bad char * cast that causes incorrect results on big-endian
121	systems. Also fixed an out-of-bounds read for empty CCL.
122	Fixed a buffer overflow in substr with utf-8 strings.
123	Many thanks to Todd C Miller.
124
125Sep 24, 2023:
126	fnematch and getrune have been overhauled to solve issues around
127	unicode FS and RS. Also fixed gsub null match issue with unicode.
128	Big thanks to Arnold Robbins.
129
130Sep 12, 2023:
131	Fixed a length error in u8_byte2char that set RSTART to
132	incorrect (cannot happen) value for EOL match(str, /$/).
133
134
135-----------------------------------------------------------------
136
137[This entry is a summary, not a precise list of changes.]
138
139	Added --csv option to enable processing of comma-separated
140	values inputs.  When --csv is enabled, fields are separated
141	by commas, fields may be quoted with " double quotes, fields
142	may contain embedded newlines.
143
144	If no explicit separator argument is provided, split() uses
145	the setting of --csv to determine how fields are split.
146
147	Strings may now contain UTF-8 code points (not necessarily
148	characters).  Functions that operate on characters, like
149	length, substr, index, match, etc., use UTF-8, so the length
150	of a string of 3 emojis is 3, not 12 as it would be if bytes
151	were counted.
152
153	Regular expressions are processed as UTF-8.
154
155	Unicode literals can be written as \u followed by one
156	to eight hexadecimal digits.  These may appear in strings and
157	regular expressions.
158