]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'maint'
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 21 Feb 2016 10:58:39 +0000 (11:58 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 21 Feb 2016 10:58:39 +0000 (11:58 +0100)
A single fix that avoids to shift 32 bit integers for attribute
bitmasks where 64 bit quantities are necessary.

aft.c

diff --git a/aft.c b/aft.c
index f5830dacd0ce98836380bd89dcc5a28cc29cbd45..261054df8fc4012236b42246158b87b77ce1623c 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2401,6 +2401,7 @@ static int com_setatt_callback(struct afs_callback_arg *aca)
        ) {
                char c;
                unsigned char bitnum;
+               uint64_t one = 1;
 
                len = strlen(p);
                ret = -E_ATTR_SYNTAX;
@@ -2416,9 +2417,9 @@ static int com_setatt_callback(struct afs_callback_arg *aca)
                        goto out;
                }
                if (c == '+')
-                       cad.add_mask |= (1UL << bitnum);
+                       cad.add_mask |= (one << bitnum);
                else
-                       cad.del_mask |= (1UL << bitnum);
+                       cad.del_mask |= (one << bitnum);
        }
        ret = -E_ATTR_SYNTAX;
        if (!cad.add_mask && !cad.del_mask)