shithub: libmujs

Download patch

ref: 6d1404397f3c3433334418f56048bead007729ac
parent: f93d24539bc1dc3e8f82ebc6c4e90c3a82adb430
author: Connor Nelson <Connor@ConnorNelson.com>
date: Mon Apr 12 15:22:04 EDT 2021

Prevent negative table indexing in js_strtol

--- a/jsvalue.c
+++ b/jsvalue.c
@@ -29,7 +29,7 @@
 		80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80
 	};
 	double x;
-	int c;
+	unsigned char c;
 	if (base == 10)
 		for (x = 0, c = *s++; (0 <= c - '0') && (c - '0' < 10); c = *s++)
 			x = x * 10 + (c - '0');