From 1c25f3fdf3e6b8b2708d5751a9c8f07a117910c6 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 4 May 2024 11:06:52 -0600 Subject: ota: Import One True Awk 20240422 (a3b68e649d2d) Apr 22, 2024: fixed regex engine gototab reallocation issue that was introduced during the Nov 24 rewrite. Thanks to Arnold Robbins. Fixed a scan bug in split in the case the separator is a single character. thanks to Oguz Ismail for spotting the issue. Mar 10, 2024: fixed use-after-free bug in fnematch due to adjbuf invalidating the pointers to buf. thanks to github user caffe3 for spotting the issue and providing a fix, and to Miguel Pineiro Jr. for the alternative fix. MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max. thanks to Miguel Pineiro Jr. Note: This brings in the matchop-deref.* files that were missing (but in FreeBSD already) and adds system-stauts.ok2. The latter has been deleted in FreeBSD since it does not fit ATF well. Care must be taken to remove it before the merge this time. Sponsored by: Netflix --- bugs-fixed/matchop-deref.awk | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bugs-fixed/matchop-deref.awk (limited to 'bugs-fixed/matchop-deref.awk') diff --git a/bugs-fixed/matchop-deref.awk b/bugs-fixed/matchop-deref.awk new file mode 100644 index 000000000000..6c066aad911d --- /dev/null +++ b/bugs-fixed/matchop-deref.awk @@ -0,0 +1,11 @@ +function foo() { + return "aaaaaab" +} + +BEGIN { + print match(foo(), "b") +} + +{ + print match(substr($0, 1), "b") +} -- cgit v1.2.3