Skip to content

Commit fe7deac

Browse files
authored
Improve sanity check with WP sync code (#3052)
1 parent 19aeee2 commit fe7deac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CLR/WireProtocol/WireProtocol_Message.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ bool SyncToMessageStart()
8989
size_t moveLength = len - 1;
9090

9191
// Ensure that the memory regions do not exceed allocated bounds
92-
if ((src + moveLength > (uint8_t *)&_inboundMessage + sizeof(_inboundMessage)) ||
93-
(dst + moveLength > (uint8_t *)&_inboundMessage + sizeof(_inboundMessage)))
92+
if ((src + moveLength >= (uint8_t *)&_inboundMessage + sizeof(_inboundMessage)) ||
93+
(dst + moveLength >= (uint8_t *)&_inboundMessage + sizeof(_inboundMessage)))
9494
{
9595
return false;
9696
}

0 commit comments

Comments
 (0)