[U-Boot] [PATCH] fs: ext4: fix symlink read function
Stefan Roese
sr at denx.de
Wed Apr 27 18:40:50 CEST 2016
From: Ronald Zachariah <rozachar at cisco.com>
The function ext4fs_read_symlink was unable to handle a symlink
which had target name of exactly 60 characters.
Signed-off-by: Ronald Zachariah <rozachar at cisco.com>
Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Stephen Warren <swarren at nvidia.com>
Cc: Tom Rini <trini at konsulko.com>
---
fs/ext4/ext4_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 84fba76..868c281 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -2040,7 +2040,7 @@ static char *ext4fs_read_symlink(struct ext2fs_node *node)
if (!symlink)
return 0;
- if (__le32_to_cpu(diro->inode.size) <= 60) {
+ if (__le32_to_cpu(diro->inode.size) < 60) {
strncpy(symlink, diro->inode.b.symlink,
__le32_to_cpu(diro->inode.size));
} else {
--
2.8.1
More information about the U-Boot
mailing list