Fix [27]: calls to decode_context_enumerated() pass &uint32_t (#29)
This commit is contained in:
committed by
Steve Karg
parent
7f5045ff3f
commit
e0c2a452e2
@@ -88,14 +88,17 @@ int bacapp_decode_access_rule(uint8_t *apdu, BACNET_ACCESS_RULE *rule)
|
||||
{
|
||||
int len;
|
||||
int apdu_len = 0;
|
||||
uint32_t time_range_specifier = rule->time_range_specifier;
|
||||
uint32_t location_specifier = rule->location_specifier;
|
||||
|
||||
if (decode_is_context_tag(&apdu[apdu_len], 0)) {
|
||||
len = decode_context_enumerated(
|
||||
&apdu[apdu_len], 0, &rule->time_range_specifier);
|
||||
&apdu[apdu_len], 0, &time_range_specifier);
|
||||
if (len < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
apdu_len += len;
|
||||
rule->time_range_specifier = time_range_specifier;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
@@ -117,11 +120,12 @@ int bacapp_decode_access_rule(uint8_t *apdu, BACNET_ACCESS_RULE *rule)
|
||||
|
||||
if (decode_is_context_tag(&apdu[apdu_len], 2)) {
|
||||
len = decode_context_enumerated(
|
||||
&apdu[apdu_len], 2, &rule->location_specifier);
|
||||
&apdu[apdu_len], 2, &location_specifier);
|
||||
if (len < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
apdu_len += len;
|
||||
rule->location_specifier = location_specifier;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
@@ -79,13 +79,15 @@ int bacapp_decode_authentication_factor(
|
||||
{
|
||||
int len;
|
||||
int apdu_len = 0;
|
||||
uint32_t format_type = af->format_type;
|
||||
|
||||
if (decode_is_context_tag(&apdu[apdu_len], 0)) {
|
||||
len = decode_context_enumerated(&apdu[apdu_len], 0, &af->format_type);
|
||||
len = decode_context_enumerated(&apdu[apdu_len], 0, &format_type);
|
||||
if (len < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
apdu_len += len;
|
||||
af->format_type = format_type;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
@@ -80,13 +80,15 @@ int bacapp_decode_authentication_factor_format(
|
||||
{
|
||||
int len;
|
||||
int apdu_len = 0;
|
||||
uint32_t format_type = aff->format_type;
|
||||
|
||||
if (decode_is_context_tag(&apdu[apdu_len], 0)) {
|
||||
len = decode_context_enumerated(&apdu[apdu_len], 0, &aff->format_type);
|
||||
len = decode_context_enumerated(&apdu[apdu_len], 0, &format_type);
|
||||
if (len < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
apdu_len += len;
|
||||
aff->format_type = format_type;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
@@ -73,13 +73,15 @@ int bacapp_decode_credential_authentication_factor(
|
||||
{
|
||||
int len;
|
||||
int apdu_len = 0;
|
||||
uint32_t disable = caf->disable;
|
||||
|
||||
if (decode_is_context_tag(&apdu[apdu_len], 0)) {
|
||||
len = decode_context_enumerated(&apdu[apdu_len], 0, &caf->disable);
|
||||
len = decode_context_enumerated(&apdu[apdu_len], 0, &disable);
|
||||
if (len < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
apdu_len += len;
|
||||
caf->disable = disable;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user