[U-Boot] [PATCH 9/9] ubifs: Add '\0' to the end of the realpath
Stefan Roese
sr at denx.de
Fri Apr 24 16:13:15 CEST 2009
On Friday 24 April 2009, Ricardo Ribalda Delgado wrote:
> ---
First of all your Signed-off-by line is missing. In your other patch as well.
And please add a description of the problem that's fixed with this patch. I've
used UBIFS on some boards now and have not seen any problems. Please give an
example of what's broken in the current code and fixed with your patch.
> fs/ubifs/ubifs.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
> index 0708d90..4dc315e 100644
> --- a/fs/ubifs/ubifs.c
> +++ b/fs/ubifs/ubifs.c
> @@ -646,6 +646,8 @@ int ubifs_load(char *filename, u32 addr, u32 size)
> ui = ubifs_inode(inode);
> if (((inode->i_mode & S_IFMT) == S_IFLNK) && ui->data_len) {
> memcpy(link_name, ui->data, ui->data_len);
> + link_name[ui->data_len]='\0';
> + memcpy(link_name, ui->data, ui->data_len);
Hmmm. This looks strange. Didn't you want to remove the first memcpy()?
Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
More information about the U-Boot
mailing list