intel/decoder: Fix is_header_field starting condition.

Starting positions >= 32 are not part of the header, rather than >.

Caught by Coverity, which found that "bits <<= field->start" may shift
by 32, which has undefined behavior.

CID: 1404968

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Kenneth Graunke 2017-04-12 09:53:44 -07:00
parent 6142c3e298
commit 9b71709cb8
1 changed files with 1 additions and 1 deletions

View File

@ -849,7 +849,7 @@ is_header_field(struct gen_group *group, struct gen_field *field)
{
uint32_t bits;
if (field->start > 32)
if (field->start >= 32)
return false;
bits = (1U << (field->end - field->start + 1)) - 1;