use unsigned value for shifting, avoiding undefined behavior
authorKen Raeburn <raeburn@mit.edu>
Mon, 9 Feb 2009 16:07:42 +0000 (16:07 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 9 Feb 2009 16:07:42 +0000 (16:07 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21914 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/aes/aes_s2k.c

index 30ca275014323e3c0b47db98a6051ff97162bd8d..36045edc0dac29fffff7fbdf6ac93541ee8805f0 100644 (file)
@@ -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;
        }