commit | a80215237e0c3538b0b8727e66e9adb8b16db387 | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | Thu Nov 19 12:24:44 2020 +0100 |
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | Sun Nov 29 05:18:16 2020 +0100 |
tree | 8b94207b8dacbc7370398492f30e2d9133ef420d | |
parent | 2bfeb4b31a616de3ddd3eb660d7484990b1bdf8b [diff] |
fs: fat: avoid NULL dereference when root dir is full When trying to create a file in the full root directory of a FAT32 filesystem a NULL dereference can be observed. When the root directory of a FAT16 filesystem is full fill_dir_slot() must return -1 to signal that a new directory entry could not be allocated. Fixes: cd2d727fff7e ("fs: fat: allocate a new cluster for root directory of fat32") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>