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

This commit is contained in:
cinap_lenrek 2015-08-03 15:26:33 +02:00
parent 0d93e2fe70
commit 9289c4b796

View file

@ -18,7 +18,7 @@ httpunesc(HConnect *cc, char *s)
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;