Home | History | Annotate | Line # | Download | only in dist
      1 /****************************************************************
      2 Copyright (C) Lucent Technologies 1997
      3 All Rights Reserved
      4 
      5 Permission to use, copy, modify, and distribute this software and
      6 its documentation for any purpose and without fee is hereby
      7 granted, provided that the above copyright notice appear in all
      8 copies and that both that the copyright notice and this
      9 permission notice and warranty disclaimer appear in supporting
     10 documentation, and that the name Lucent Technologies or any of
     11 its entities not be used in advertising or publicity pertaining
     12 to distribution of the software without specific, written prior
     13 permission.
     14 
     15 LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
     16 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
     17 IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
     18 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
     20 IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     21 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
     22 THIS SOFTWARE.
     23 ****************************************************************/
     24 
     25 This file lists all bug fixes, changes, etc., made since the
     26 second edition of the AWK book was published in September 2023.
     27 
     28 Apr 26, 2026
     29 	regex fixes: limit the repetition count to 255 like
     30 	POSIX does to prevent signed integer overflow.
     31 	prevent a crash when the repetition is the first atom parsed
     32 	Thanks to Renaud Allard an Todd Miller.
     33 
     34 Dec 24, 2025
     35 	Previously changed and broken rand() implementation
     36 	restored in run.c with a variant thanks to Henry Spencer.
     37 
     38 Aug 04, 2025
     39 	Fix a syntax issue with /= that caused constants to
     40 	turn into variables [eg. 42 /= 7]. Thanks to Arnold
     41 	Robbins.
     42 
     43 Jan 14, 2025
     44 	Fix incorrect error line number issues. unput has
     45 	no business managing lineno. Thanks to Ozan Yigit.
     46 
     47 Jan 05, 2025
     48 	Fix hex detection in is_valid_number.
     49 	Fix indirect field specification with non-numeric string
     50 	eg. $("foo") in indirect. This is not illegal.
     51 	Thanks to Arnold Robbins.
     52 
     53 Jan 01, 2025
     54 	Fixed openfile to not try to read from a directory.
     55 	Thanks to Arnold Robbins.
     56 
     57 Jul 28, 2024
     58 	Fixed readcsvrec resize segfault when reading csv records longer
     59 	than 8k. Thanks to Ozan Yigit.
     60 	mktime() added to bsd-features branch. Thanks to Todd Miller.
     61 
     62 Jun 23, 2024
     63 	Fix signal for system-status test. Thanks to Tim van der Molen.
     64 	Rewrite if-else chain as switch. Thanks to Andrew Sukach.
     65 
     66 May 27, 2024
     67 	Spelling fixes and removal of unneeded prototypes and extern.
     68 	Thanks to Jonathan Gray.
     69 
     70 May 4, 2024
     71 	Fixed a use-after-free bug with ARGV for "delete ARGV".
     72 	Also ENVtab is no longer global. Thanks to Benjamin Sturz
     73 	for spotting the ARGV issue and	Todd Miller for the fix.
     74 
     75 May 3, 2024:
     76 	Remove warnings when compiling with g++. Thanks to Arnold Robbins.
     77 
     78 Apr 22, 2024:
     79 	Fixed regex engine gototab reallocation issue that was
     80 	Introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
     81 	Fixed a scan bug in split in the case the separator is a single
     82 	character. Thanks to Oguz Ismail for spotting the issue.
     83 
     84 Mar 10, 2024:
     85 	Fixed use-after-free bug in fnematch due to adjbuf invalidating
     86 	the pointers to buf. Thanks to github user caffe3 for spotting
     87 	the issue and providing a fix, and to Miguel Pineiro Jr.
     88 	for the alternative fix.
     89 	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
     90 	thanks to Miguel Pineiro Jr.
     91 
     92 Jan 22, 2024:
     93 	Restore the ability to compile with g++. Thanks to
     94 	Arnold Robbins.
     95 
     96 Dec 24, 2023:
     97 	Matchop dereference after free problem fix when the first
     98 	argument is a function call. Thanks to Oguz Ismail Uysal.
     99 	Fix inconsistent handling of --csv and FS set in the
    100 	command line. Thanks to Wilbert van der Poel.
    101 	Casting changes to int for is* functions.
    102 
    103 Nov 27, 2023:
    104 	Fix exit status of system on MacOS. Update to REGRESS.
    105 	Thanks to Arnold Robbins.
    106 	Fix inconsistent handling of -F and --csv, and loss of csv
    107 	mode when FS is set.
    108 
    109 Nov 24, 2023:
    110         Fix issue #199: gototab improvements to dynamically resize the
    111         table, qsort and bsearch to improve the lookup speed as the
    112         table gets larger for multibyte input. Thanks to Arnold Robbins.
    113 
    114 Nov 23, 2023:
    115 	Fix Issue #169, related to escape sequences in strings.
    116 	Thanks to Github user rajeevvp.
    117 	Fix Issue #147, reported by Github user drawkula, and fixed
    118 	by Miguel Pineiro Jr.
    119 
    120 Nov 20, 2023:
    121 	Rewrite of fnematch to fix a number of issues, including
    122 	extraneous output, out-of-bounds access, number of bytes
    123 	to push back after a failed match etc.
    124 	Thanks to Miguel Pineiro Jr.
    125 
    126 Nov 15, 2023:
    127 	Man page edit, regression test fixes. Thanks to Arnold Robbins
    128 	Consolidation of sub and gsub into dosub, removing duplicate
    129 	code. Thanks to Miguel Pineiro Jr.
    130 	gcc replaced with cc everywhere.
    131 
    132 Oct 30, 2023:
    133 	Multiple fixes and a minor code cleanup.
    134 	Disabled utf-8 for non-multibyte locales, such as C or POSIX.
    135 	Fixed a bad char * cast that causes incorrect results on big-endian
    136 	systems. Also fixed an out-of-bounds read for empty CCL.
    137 	Fixed a buffer overflow in substr with utf-8 strings.
    138 	Many thanks to Todd C Miller.
    139 
    140 Sep 24, 2023:
    141 	fnematch and getrune have been overhauled to solve issues around
    142 	unicode FS and RS. Also fixed gsub null match issue with unicode.
    143 	Big thanks to Arnold Robbins.
    144 
    145 Sep 12, 2023:
    146 	Fixed a length error in u8_byte2char that set RSTART to
    147 	incorrect (cannot happen) value for EOL match(str, /$/).
    148 
    149 
    150 -----------------------------------------------------------------
    151 
    152 [This entry is a summary, not a precise list of changes.]
    153 
    154 	Added --csv option to enable processing of comma-separated
    155 	values inputs.  When --csv is enabled, fields are separated
    156 	by commas, fields may be quoted with " double quotes, fields
    157 	may contain embedded newlines.
    158 
    159 	If no explicit separator argument is provided, split() uses
    160 	the setting of --csv to determine how fields are split.
    161 
    162 	Strings may now contain UTF-8 code points (not necessarily
    163 	characters).  Functions that operate on characters, like
    164 	length, substr, index, match, etc., use UTF-8, so the length
    165 	of a string of 3 emojis is 3, not 12 as it would be if bytes
    166 	were counted.
    167 
    168 	Regular expressions are processed as UTF-8.
    169 
    170 	Unicode literals can be written as \u followed by one
    171 	to eight hexadecimal digits.  These may appear in strings and
    172 	regular expressions.
    173