shithub: trueawk

Download patch

ref: c7361cd72fa0032855b87f2a092cda0c750feb5a
parent: 28d4561613bceda26f93833333cdd3317d416243
parent: 56dbbc2f99f6e70c98db254e255fbe450bf4e7f0
author: ozan yigit <ozan.yigit@gmail.com>
date: Mon Oct 30 15:58:20 EDT 2023

todd miller's substr fix for buffer overflow with utf-8 strings

--- a/run.c
+++ b/run.c
@@ -985,7 +985,7 @@
 	if (a[2] != NULL)
 		z = execute(a[2]);
 	s = getsval(x);
-	k = strlen(s) + 1;
+	k = u8_strlen(s) + 1;
 	if (k <= 1) {
 		tempfree(x);
 		tempfree(y);
--