att_logical_or() is called from com_check() to set up a bitmask where
a bit is set if and only if it corresponds to an existing attribute.
Doing "1 << i" is wrong in this context because the constant "1" is a
(signed) 32 bit quantity and we need to be able to shift by more than
31 bits for the attribute mask.
Fix this by using an uint64_t variable instead.
static int att_logical_or(struct osl_row *row, void *data)
{
- uint64_t *att_mask = data;
+ uint64_t *att_mask = data, one = 1;
struct osl_object bitnum_obj;
int ret = osl_get_object(attribute_table, row, ATTCOL_BITNUM, &bitnum_obj);
if (ret < 0)
return ret;
- *att_mask |= 1 << *(unsigned char *)bitnum_obj.data;
+ *att_mask |= one << *(unsigned char *)bitnum_obj.data;
return 0;
}