mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 12:21:37 +08:00
0d906bd5c0
* Add seasocks 1.4.5 * Update CI baseline * Add patch to fix x86 build See https://github.com/mattgodbolt/seasocks/pull/192 * Update CI baseline * Add supports attribute * Update CI baseline * Disable Windows due to https://github.com/mattgodbolt/seasocks/pull/193 * Update CI baseline --------- Co-authored-by: chausner <chausner@users.noreply.github.com>
34 lines
1.6 KiB
Diff
34 lines
1.6 KiB
Diff
diff --git a/src/main/c/HybiPacketDecoder.cpp b/src/main/c/HybiPacketDecoder.cpp
|
|
--- a/src/main/c/HybiPacketDecoder.cpp
|
|
+++ b/src/main/c/HybiPacketDecoder.cpp
|
|
@@ -66,7 +66,7 @@ HybiPacketDecoder::MessageState HybiPacketDecoder::decodeNextMessage(
|
|
deflateNeeded = !!(reservedBits & 0x40);
|
|
|
|
auto opcode = static_cast<Opcode>(_buffer[_messageStart] & 0xf);
|
|
- size_t payloadLength = _buffer[_messageStart + 1] & 0x7fu;
|
|
+ uint64_t payloadLength = _buffer[_messageStart + 1] & 0x7fu;
|
|
auto maskBit = _buffer[_messageStart + 1] & 0x80;
|
|
auto ptr = _messageStart + 2;
|
|
if (payloadLength == 126) {
|
|
@@ -103,7 +103,7 @@ HybiPacketDecoder::MessageState HybiPacketDecoder::decodeNextMessage(
|
|
}
|
|
|
|
messageOut.clear();
|
|
- messageOut.reserve(payloadLength);
|
|
+ messageOut.reserve(static_cast<size_t>(payloadLength));
|
|
for (auto i = 0u; i < payloadLength; ++i) {
|
|
auto byteShift = (3 - (i & 3)) * 8;
|
|
messageOut.push_back(static_cast<uint8_t>((_buffer[ptr++] ^ (mask >> byteShift)) & 0xff));
|
|
diff --git a/src/main/c/seasocks/StreamingResponse.cpp b/src/main/c/seasocks/StreamingResponse.cpp
|
|
--- a/src/main/c/seasocks/StreamingResponse.cpp
|
|
+++ b/src/main/c/seasocks/StreamingResponse.cpp
|
|
@@ -51,7 +51,7 @@ void StreamingResponse::handle(std::shared_ptr<ResponseWriter> writer) {
|
|
bool isGood = stream->good();
|
|
if (isGood || isEof) {
|
|
// everything is fine, push data to client
|
|
- writer->payload(buffer.get(), stream->gcount(), flush);
|
|
+ writer->payload(buffer.get(), static_cast<size_t>(stream->gcount()), flush);
|
|
}
|
|
|
|
if (!isGood) {
|