[libsoup] websocket: fix off-by-one in incoming payload size check
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] websocket: fix off-by-one in incoming payload size check
- Date: Fri, 9 Jul 2021 07:48:40 +0000 (UTC)
commit 68b957539e2e8532348d44525fa0188782ad68a7
Author: Ole André Vadla Ravnås <oleavr gmail com>
Date: Fri Jul 9 02:54:56 2021 +0200
websocket: fix off-by-one in incoming payload size check
libsoup/websocket/soup-websocket-connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libsoup/websocket/soup-websocket-connection.c b/libsoup/websocket/soup-websocket-connection.c
index de4ab4ea..5fc933ef 100644
--- a/libsoup/websocket/soup-websocket-connection.c
+++ b/libsoup/websocket/soup-websocket-connection.c
@@ -1055,7 +1055,7 @@ process_frame (SoupWebsocketConnection *self)
/* Safety valve */
if (priv->max_incoming_payload_size > 0 &&
- payload_len >= priv->max_incoming_payload_size) {
+ payload_len > priv->max_incoming_payload_size) {
too_big_error_and_close (self, payload_len);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]