shithub: riscv

Download patch

ref: 9289c4b796b03fc1f164964466542090a2779be4
parent: 0d93e2fe70ebbed69d65ef711f4060e949af1285
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Aug 3 11:26:33 EDT 2015

libhttpd: use strtol to parse decimal character references in httpunesc()

--- a/sys/src/libhttpd/httpunesc.c
+++ b/sys/src/libhttpd/httpunesc.c
@@ -18,7 +18,7 @@
 	for(t = v; c = *s;){
 		if(c == '&'){
 			if(s[1] == '#' && s[2] && s[3] && s[4] && s[5] == ';'){
-				c = atoi(s+2);
+				c = strtol(s+2, 0, 10);
 				if(c < Runeself){
 					*t++ = c;
 					s += 6;