Skip to content

Commit

Permalink
rewrite the condition a bit to make it more clear that we check the v…
Browse files Browse the repository at this point in the history
…alue is in range
  • Loading branch information
er13 committed Mar 26, 2017
1 parent 5e3304c commit aa4dc6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion avm_kernel_config/avm_kernel_config_helpers.c
Expand Up @@ -140,7 +140,8 @@ bool isConsistentConfigArea(struct _avm_kernel_config * *configArea, size_t conf
tag = entry->tag;
swapEndianess(assumeSwapped, &tag);
// invalid value means, our assumption was wrong
if (tag != 0 && tag > avm_kernel_config_tags_last) return false;
if (!(avm_kernel_config_tags_undef < tag && tag <= avm_kernel_config_tags_last))
return false;
}

// now we compute offset in kernel
Expand Down

0 comments on commit aa4dc6d

Please sign in to comment.