heimdal: Avoid overflow when performing bitwise shift operations

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Joseph Sutton
2021-07-14 16:04:48 +12:00
committed by Jeffrey Altman
parent bc37bf1afd
commit 1c93a6ff26
5 changed files with 36 additions and 21 deletions

View File

@@ -132,9 +132,9 @@ struct _krb5_encryption_type {
krb5_crypto, const krb5_data *, krb5_data *);
};
#define ENCRYPTION_USAGE(U) (((U) << 8) | 0xAA)
#define INTEGRITY_USAGE(U) (((U) << 8) | 0x55)
#define CHECKSUM_USAGE(U) (((U) << 8) | 0x99)
#define ENCRYPTION_USAGE(U) (((uint32_t)(U) << 8) | 0xAA)
#define INTEGRITY_USAGE(U) (((uint32_t)(U) << 8) | 0x55)
#define CHECKSUM_USAGE(U) (((uint32_t)(U) << 8) | 0x99)
/* Checksums */