lkml.org 
[lkml]   [2011]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectPossible coding issue in udf??
    In fs/udf/inode.c, line 1455, linux 2.6.35, there is the following code:

    udfperms = ((inode->i_mode & S_IRWXO)) |
    ((inode->i_mode & S_IRWXG) << 2) |
    ((inode->i_mode & S_IRWXU) << 4);

    Shouldn't we be shifting by 3 bits? i.e:
    udfperms = ((inode->i_mode & S_IRWXO)) |
    ((inode->i_mode & S_IRWXG) << 3) |
    ((inode->i_mode & S_IRWXU) << 6);

    The S_I.. constants are all defined in include/linux/stat.h as 3-bit values.

    I will send a patch if needed.

    I code, therefore I am


    \
     
     \ /
      Last update: 2011-05-14 05:05    [W:0.020 / U:65.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site