piMini(max_size, buff.size()) implicitly narrows size_t to int, which is UB for large buffers. Replace with explicit piMin<ssize_t> matching the correct pattern used in picloudclient.cpp.
piMini(max_size, buff.size()) implicitly narrows size_t to int, which is UB for large buffers. Replace with explicit piMin<ssize_t> matching the correct pattern used in picloudclient.cpp.