Fragments forming a long message are not caught early
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
# You can select which sanitizer to use by setting this
|
||||
SANITIZER ?= address
|
||||
# These are set by OSS-Fuzz, we default to AddressSanitizer
|
||||
CXXFLAGS ?= -DLIBUS_NO_SSL -fsanitize=$(SANITIZER),fuzzer
|
||||
CFLAGS ?= -DLIBUS_NO_SSL
|
||||
override CXXFLAGS += -DLIBUS_NO_SSL -fsanitize=$(SANITIZER),fuzzer
|
||||
override CFLAGS += -DLIBUS_NO_SSL
|
||||
OUT ?= .
|
||||
|
||||
oss-fuzz:
|
||||
|
||||
@@ -100,6 +100,11 @@ private:
|
||||
if (!webSocketData->fragmentBuffer.length()) {
|
||||
webSocketData->fragmentBuffer.reserve(length + remainingBytes);
|
||||
}
|
||||
/* Fragments forming a big message are not caught until appending them */
|
||||
if (refusePayloadLength(length + webSocketData->fragmentBuffer.length(), webSocketState, s)) {
|
||||
forceClose(webSocketState, s);
|
||||
return true;
|
||||
}
|
||||
webSocketData->fragmentBuffer.append(data, length);
|
||||
|
||||
/* Are we done now? */
|
||||
|
||||
Reference in New Issue
Block a user