shithub: trueawk

Download patch

ref: 3c2e168a8f794ed61c93131b05fb998d79d155df
parent: 0fb991ab7e957d1a464cbdb960a28cec942484b8
author: ozan yigit <ozan.yigit@gmail.com>
date: Fri Aug 2 15:20:52 EDT 2024

readcvsrec called with the wrong pointers, causing awk to
crash when the buffer is reallocated to read longer than 8k csv records.

--- a/lib.c
+++ b/lib.c
@@ -231,7 +231,7 @@
 	char *rs = getsval(rsloc);
 
 	if (CSV) {
-		c = readcsvrec(pbuf, pbufsize, inf, newflag);
+		c = readcsvrec(&buf, &bufsize, inf, newflag);
 		isrec = (c == EOF && rr == buf) ? false : true;
 	} else if (*rs && rs[1]) {
 		bool found;
--