From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 24 Apr 2009 16:13:15 +0200 Subject: [U-Boot] [PATCH 9/9] ubifs: Add '\0' to the end of the realpath In-Reply-To: <1240573815-11168-2-git-send-email-ricardo.ribalda@uam.es> References: <1240573815-11168-1-git-send-email-ricardo.ribalda@uam.es> <1240573815-11168-2-git-send-email-ricardo.ribalda@uam.es> Message-ID: <200904241613.15874.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================