Skip to content

Commit ed7060a

Browse files
Fix version compare in trusted name
Comparison never stopped even when it did not make sense to keep going.
1 parent 7e3a15d commit ed7060a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src_features/provide_trusted_name/trusted_name.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ static bool handle_not_valid_after(const s_tlv_data *data, s_trusted_name_ctx *c
173173
return false;
174174
}
175175
for (int i = 0; i < (int) ARRAYLEN(app_version); ++i) {
176-
if (data->value[i] < app_version[i]) {
176+
if (data->value[i] > app_version[i]) {
177+
break;
178+
} else if (data->value[i] < app_version[i]) {
177179
PRINTF("Expired trusted name : %u.%u.%u < %u.%u.%u\n",
178180
data->value[0],
179181
data->value[1],

0 commit comments

Comments
 (0)