Never accept whitespace between key and colon

This commit is contained in:
uNetworkingAB
2022-10-24 19:02:04 +02:00
committed by GitHub
parent 22f0b04a1d
commit 74dac77adb
+4
View File
@@ -229,6 +229,10 @@ private:
if (postPaddedBuffer[0] == ':' && postPaddedBuffer[1] == ' ') {
postPaddedBuffer += 2;
} else {
/* We should not accept whitespace between key and colon */
if (postPaddedBuffer[0] != ':') {
return 0;
}
/* Trim until value starts */
for (; (*postPaddedBuffer == ':' || *(unsigned char *)postPaddedBuffer < 33) && *postPaddedBuffer != '\r'; postPaddedBuffer++);
}