mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 02:41:21 +02:00
nhttpd: fix stack buffer overflow
This commit is contained in:
@@ -486,7 +486,8 @@ std::string CySocket::ReceiveLine() {
|
|||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
buffer[++bytes_gotten] = '\0';
|
if (bytes_gotten < MAX_LINE_BUFFER - 1)
|
||||||
|
buffer[++bytes_gotten] = '\0';
|
||||||
result.assign(buffer, bytes_gotten);
|
result.assign(buffer, bytes_gotten);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user