gss: fix signedness on is_initiator bitfield

In SAnon:

The is_initiator bitfield must be unsigned to avoid undefined behaviour, as
there is only a single bit defined. Thanks to Nico Williams for explaining
this.
This commit is contained in:
Luke Howard
2020-04-27 18:44:02 +10:00
parent c785af8b62
commit 69b34d1b8a

View File

@@ -50,7 +50,7 @@ typedef struct sanon_ctx_desc {
uint8_t pk[crypto_scalarmult_curve25519_BYTES];
/* krb5 context for message protection/PRF */
gss_ctx_id_t rfc4121;
int is_initiator : 1;
unsigned is_initiator : 1;
} *sanon_ctx;
extern gss_name_t _gss_sanon_anonymous_identity;