From 5ead4507cca922081bc8dc066ff281a71e893d5d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 28 Jan 2022 16:13:09 +0100 Subject: [PATCH] pulse-server: ensure tlength <= maxlength See #2069 --- src/modules/module-protocol-pulse/stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/module-protocol-pulse/stream.c b/src/modules/module-protocol-pulse/stream.c index 4c362f92f..dc4fdbf2c 100644 --- a/src/modules/module-protocol-pulse/stream.c +++ b/src/modules/module-protocol-pulse/stream.c @@ -332,6 +332,8 @@ int stream_update_minreq(struct stream *stream, uint32_t minreq) return 0; stream->attr.tlength = new_tlength; + if (stream->attr.tlength > stream->attr.maxlength) + stream->attr.tlength = stream->attr.maxlength; if (client->version >= 15) { struct message *msg;