f796ee8 fsck.gfs2: Fix buffer overflow in get_lockproto_table

Authored and Committed by andyp 11 years ago
    fsck.gfs2: Fix buffer overflow in get_lockproto_table
    
    Coverity discovered a buffer overflow in this function where an overly
    long cluster name in cluster.conf could cause a crash while repairing
    the superblock. This patch fixes the bug by making sure the lock table
    is composed sensibly, limiting the fsname to 16 chars as documented, and
    only allowing the cluster name (which doesn't seem to have a documented
    max size) to use the remaining space in the locktable name string.
    
    Resolves: rhbz#838945
    
    Signed-off-by: Andrew Price <anprice@redhat.com>
    
        
file modified
+22 -20