krb5_wrap: Fix bit shifting
authorAndreas Schneider <asn@samba.org>
Wed, 12 Dec 2018 09:10:08 +0000 (10:10 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Dec 2018 11:40:40 +0000 (12:40 +0100)
lib/krb5_wrap/enctype_convert.c:93:27: runtime error: left shift of 1 by
31 places cannot be represented in type 'int'

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Dec 19 12:40:40 CET 2018 on sn-devel-144

lib/krb5_wrap/enctype_convert.c

index b78304f..a658911 100644 (file)
@@ -90,7 +90,7 @@ krb5_error_code ms_suptypes_to_ietf_enctypes(TALLOC_CTX *mem_ctx,
                return ENOMEM;
        }
        for (i = 0; i < (8 * sizeof(enctype_bitmap)); i++) {
-               uint32_t bit_value = (1 << i) & enctype_bitmap;
+               uint32_t bit_value = (1U << i) & enctype_bitmap;
                if (bit_value & enctype_bitmap) {
                        (*enctypes)[j] = ms_suptype_to_ietf_enctype(bit_value);
                        if (!(*enctypes)[j]) {