Files
pip/libs
andrey 8bac29d655 fix(picloudtcp): snapshot header under mutex_send in send* and validate payload in parse*
sendStart/sendConnected/sendDisconnected/sendData/sendPing mutated
the shared header.type and serialized the header without holding
mutex_send (it only covered streampacker->send), so concurrent
senders (e.g. ping timer vs app thread on PICloudServer) could mix
type/role bytes of different frames. Snapshot the header into a
local copy under mutex_send in every send* and setRole now takes the
lock as well.

parseDataServer/parseConnect/parseDisconnect read a uint without
checking the payload size; PIByteArray does a partial memcpy on
undersized input, so a short frame produced a garbage client id.
Return the default value when the payload is shorter than sizeof(uint).
2026-08-23 17:17:34 +03:00
..
2026-08-05 12:46:43 +03:00
2026-05-26 21:37:21 +03:00
2026-08-05 19:48:01 +03:00