Fixed datetime decode of invalid tag. (#495)
* Fixed datetime decode of invalid application tag. --------- Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -1125,7 +1125,7 @@ int bacnet_datetime_decode(
|
||||
}
|
||||
len = bacnet_date_application_decode(
|
||||
&apdu[apdu_len], apdu_size - apdu_len, bdate);
|
||||
if (len < 0) {
|
||||
if (len <= 0) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
apdu_len += len;
|
||||
@@ -1134,7 +1134,7 @@ int bacnet_datetime_decode(
|
||||
}
|
||||
len = bacnet_time_application_decode(
|
||||
&apdu[apdu_len], apdu_size - apdu_len, btime);
|
||||
if (len < 0) {
|
||||
if (len <= 0) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
apdu_len += len;
|
||||
|
||||
Reference in New Issue
Block a user