mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 02:08:38 +00:00
9b5546c37a
In btrfs_lookup_path() the local variable @type should always be updated after we hit any file/dir. But if @filename is NULL from the very beginning, then we don't initialize it and return it directly. To prevent such problem from happening, we initialize @type to BTRFS_FT_UNKNOWN. For normal execution route, it will get updated for each filename we resolved. Buf if we didn't find any path, we check if the type is still FT_UNKNOWN and ret == 0. If true we know there is something wrong, just return -EUCLEAN to inform the caller. Reported-by: Coverity CID 312958 Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek Behún <marek.behun@nic.cz> |
||
---|---|---|
.. | ||
common | ||
crypto | ||
kernel-shared | ||
btrfs.c | ||
btrfs.h | ||
compat.h | ||
compression.c | ||
conv-funcs.h | ||
ctree.c | ||
ctree.h | ||
dev.c | ||
dir-item.c | ||
disk-io.c | ||
disk-io.h | ||
extent-cache.c | ||
extent-cache.h | ||
extent-io.c | ||
extent-io.h | ||
inode.c | ||
Kconfig | ||
Makefile | ||
root-tree.c | ||
subvolume.c | ||
volumes.c | ||
volumes.h |