Skip to content

Commit da28d38

Browse files
committed
Missed commit from valkuc pr
1 parent 3210fbe commit da28d38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/httpd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ void ICACHE_FLASH_ATTR httpdRecvCb(ConnTypePtr rconn, char *remIp, int remPort,
715715
}
716716
}
717717
//ToDo: return http error code 431 (request header too long) if this happens
718-
if (conn->priv->headPos!=HTTPD_MAX_HEAD_LEN) conn->priv->head[conn->priv->headPos++]=data[x];
718+
if (conn->priv->headPos<HTTPD_MAX_HEAD_LEN-1) conn->priv->head[conn->priv->headPos++]=data[x];
719719
conn->priv->head[conn->priv->headPos]=0;
720720
//Scan for /r/n/r/n. Receiving this indicate the headers end.
721721
if (data[x]=='\n' && (char *)strstr(conn->priv->head, "\r\n\r\n")!=NULL) {

0 commit comments

Comments
 (0)