fs: ext4: fix symlink read function
PATCH 1/1 fs: ext4: fix symlink read function
From: Ronald Zachariah <[email protected]>
From U-Boot commit:
| commit 37f23885e4905ff500a8524328aa3084ac11cdb4 | Author: Ronald Zachariah <[email protected]> | Date: Thu Apr 28 07:08:34 2016 +0200 | | fs: ext4: fix symlink read function | | The function ext4fs_read_symlink was unable to handle a symlink | which had target name of exactly 60 characters. | | Signed-off-by: Ronald Zachariah <[email protected]> | Signed-off-by: Stefan Roese <[email protected]> | Reviewed-by: Stephen Warren <[email protected]> | Cc: Tom Rini <[email protected]>
Signed-off-by Antony Pavlov <[email protected]>
--- fs/ext4/ext4_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/ext4_common.c +1 -1
@@ -377,7 +377,7 @@ 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) <sizeof (diro->inode.b.symlink)) {strncpy (symlink, diro->inode.b.symlink,__le32_to_cpu (diro->inode.size)); }else {
Signature · 7 lines
2.8.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 18 lines · Antony Pavlov
From: Ronald Zachariah <[email protected]>
From U-Boot commit:
| commit 37f23885e4905ff500a8524328aa3084ac11cdb4 | Author: Ronald Zachariah <[email protected]> | Date: Thu Apr 28 07:08:34 2016 +0200 | | fs: ext4: fix symlink read function | | The function ext4fs_read_symlink was unable to handle a symlink | which had target name of exactly 60 characters. | | Signed-off-by: Ronald Zachariah <[email protected]> | Signed-off-by: Stefan Roese <[email protected]> | Reviewed-by: Stephen Warren <[email protected]> | Cc: Tom Rini <[email protected]>
Quoted 4 lines
Signed-off-by Antony Pavlov <[email protected]>--- fs/ext4/ext4_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
Quoted 18 lines
fs/ext4/ext4_common.c +1
-1@@ -377,7 +377,7 @@ 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) <sizeof (diro->inode.b.symlink)) {strncpy (symlink, diro->inode.b.symlink,__le32_to_cpu (diro->inode.size)); }else {Signature · 1 line
2.8.1
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox