WriteProperty decoding length underflow (#1231)
When decoding the optional priority context tag in wp_decode_service_request(), the code passes apdu_len - apdu_size to bacnet_unsigned_context_decode instead of apdu_size - apdu_len. Similar typo in bacnet_action_command_decode().
This commit is contained in:
+1
-1
@@ -277,7 +277,7 @@ int wp_decode_service_request(
|
||||
}
|
||||
if ((unsigned)apdu_len < apdu_size) {
|
||||
len = bacnet_unsigned_context_decode(
|
||||
&apdu[apdu_len], apdu_len - apdu_size, 4, &unsigned_value);
|
||||
&apdu[apdu_len], apdu_size - apdu_len, 4, &unsigned_value);
|
||||
if (len > 0) {
|
||||
apdu_len += len;
|
||||
if ((unsigned_value >= BACNET_MIN_PRIORITY) &&
|
||||
|
||||
Reference in New Issue
Block a user