[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp
Jan Holesovsky
kendy at collabora.com
Tue Nov 8 14:04:24 UTC 2016
loolwsd/IoUtil.cpp | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 66053621bd859f19ee8fa522f0be85860ac4487d
Author: Jan Holesovsky <kendy at collabora.com>
Date: Tue Nov 8 13:10:28 2016 +0100
Make sure we resize the payload to the amount of read bytes.
Change-Id: I33f032182912b4f03d073258c91974518db327fd
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 90483ac..085422d 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -155,6 +155,7 @@ void SocketProcessor(const std::shared_ptr<WebSocket>& ws,
payload.resize(size);
n = ws->receiveFrame(payload.data(), size, flags);
+ payload.resize(n > 0 ? n : 0);
}
}
More information about the Libreoffice-commits
mailing list