Heap buffer overflow from PR #83 fixed in #121

This commit is contained in:
ozan yigit 2021-10-12 00:06:51 -04:00
parent 40f0527d5d
commit 275a80ff33
2 changed files with 6 additions and 1 deletions

5
FIXES
View File

@ -25,6 +25,11 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987. was sent to the printers in August, 1987.
Oct 12, 2021:
The fix for #83 changed the code to insert 2 chars, but the
call to adjbuf just above it only allows for 1 char. This can
cause a heap buffer overflow.
July 27, 2021: July 27, 2021:
As per IEEE Std 1003.1-2008, -F "str" is now consistent with As per IEEE Std 1003.1-2008, -F "str" is now consistent with
-v FS="str" when str is null. Thanks to Warner Losh. -v FS="str" when str is null. Thanks to Warner Losh.

2
main.c
View File

@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE. THIS SOFTWARE.
****************************************************************/ ****************************************************************/
const char *version = "version 20210724"; const char *version = "version 20211012";
#define DEBUG #define DEBUG
#include <stdio.h> #include <stdio.h>