mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-12 03:27:06 +10:00
add clamp for path length
This commit is contained in:
@@ -2798,9 +2798,10 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
if (!isConnected) return;
|
||||
|
||||
final mode = _pathHashByteWidth - 1;
|
||||
final encodedPathLen = (pathLen >= 0 && pathLen != 0xFF)
|
||||
? (pathLen | (mode << 6))
|
||||
: pathLen;
|
||||
if (pathLen < 0 || pathLen > 0x3F) {
|
||||
return;
|
||||
}
|
||||
final encodedPathLen = pathLen | (mode << 6);
|
||||
await sendFrame(
|
||||
buildUpdateContactPathFrame(
|
||||
contact.publicKey,
|
||||
|
||||
Reference in New Issue
Block a user