From: Ken Raeburn Date: Mon, 9 Feb 2009 16:07:42 +0000 (+0000) Subject: use unsigned value for shifting, avoiding undefined behavior X-Git-Tag: krb5-1.8-alpha1~690 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=08d2a32153ce09f7639e3ebc6d3c3f48d8127b7f;p=krb5.git use unsigned value for shifting, avoiding undefined behavior git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21914 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/aes/aes_s2k.c b/src/lib/crypto/aes/aes_s2k.c index 30ca27501..36045edc0 100644 --- a/src/lib/crypto/aes/aes_s2k.c +++ b/src/lib/crypto/aes/aes_s2k.c @@ -53,7 +53,7 @@ krb5int_aes_string_to_key(const struct krb5_enc_provider *enc, /* The first two need casts in case 'int' is 16 bits. */ iter_count = load_32_be(p); if (iter_count == 0) { - iter_count = (1L << 16) << 16; + iter_count = (1UL << 16) << 16; if (((iter_count >> 16) >> 16) != 1) return KRB5_ERR_BAD_S2K_PARAMS; }