mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-03 18:52:04 +00:00
BUG/MINOR: ssl: Fix potential overflow
Coverity raised a potential overflow issue in these new functions that work on unsigned long long objects. They were added in commit9b25982
"BUG/MEDIUM: ssl: Verify error codes can exceed 63". This patch needs to be backported alongside9b25982
.
This commit is contained in:
parent
f813dab175
commit
e239e4938d
@ -164,7 +164,7 @@ static inline int cert_ignerr_bitfield_get(const unsigned long long *bitfield, i
|
||||
int val = 0;
|
||||
|
||||
if (byte_index < IGNERR_BF_SIZE)
|
||||
val = bitfield[byte_index] & (1 << (bit_index & 0x3F));
|
||||
val = bitfield[byte_index] & (1ULL << (bit_index & 0x3F));
|
||||
|
||||
return val != 0;
|
||||
}
|
||||
@ -174,7 +174,7 @@ static inline void cert_ignerr_bitfield_set(unsigned long long *bitfield, int bi
|
||||
int byte_index = bit_index >> 6;
|
||||
|
||||
if (byte_index < IGNERR_BF_SIZE)
|
||||
bitfield[byte_index] |= (1 << (bit_index & 0x3F));
|
||||
bitfield[byte_index] |= (1ULL << (bit_index & 0x3F));
|
||||
}
|
||||
|
||||
static inline void cert_ignerr_bitfield_set_all(unsigned long long *bitfield)
|
||||
|
Loading…
Reference in New Issue
Block a user