Reject binary trace routes that exceed representable hop count
This commit is contained in:
1 parent
f65a8269f3
commit
ebc103f085
3 files changed
+142
-9
No files matched your search
@@ -7037,7 +7037,7 @@ void MyMesh::handleCmdFrame(size_t len) {
|
||||
uint8_t path_len = len - 10;
|
||||
uint8_t flags = cmd_frame[9];
|
||||
uint8_t path_sz = flags & 0x03; // NEW v1.11+
|
||||
if ((path_len >> path_sz) > MAX_PATH_SIZE || (path_len % (1 << path_sz)) != 0) { // make sure is multiple of path_sz
|
||||
if ((path_len >> path_sz) >= MAX_PATH_SIZE || (path_len % (1 << path_sz)) != 0) { // make sure is multiple of path_sz
|
||||
writeErrFrame(ERR_CODE_ILLEGAL_ARG);
|
||||
} else {
|
||||
uint32_t tag, auth;
|
||||
|
||||
Reference in new issue
Block a user