• Mika Kukkonen's avatar
    [PATCH] int return to unsigned in smb_proc_readdir_long() in fs/smbfs/proc.c · c1a20245
    Mika Kukkonen authored
      CC [M]  fs/smbfs/proc.o
    fs/smbfs/proc.c: In function `smb_proc_readdir_long':
    fs/smbfs/proc.c:2313: warning: comparison of unsigned expression < 0 is always false
    fs/smbfs/proc.c:2467: warning: comparison of unsigned expression < 0 is always false
    
    The first one is pretty dangerous looking, as smb_proc_readdir_long() can
    return several negative error values and all those are converted to
    unsigned and then erronously pass the test on line 2313.  Chris Wright gave
    it a quick look and we did not see immediately if this can be remotely
    exploited, but it looks pretty scary.
    
    The second warning on line 2467 is just extra so I just removed it.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    c1a20245
proc.c 82.9 KB