[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] isofs: also copy the terminating zero in read_symlink_ho
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/3] isofs: also copy the terminating zero in read_symlink_hook |
Date: |
Tue, 25 Mar 2014 02:09:59 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Thu 20 Mar 2014 14:01:19 +0100, a écrit :
> * isofs/inode.c (read_symlink_hook): Use memcpy, also copy terminating
> zero.
Ack.
> ---
> isofs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/isofs/inode.c b/isofs/inode.c
> index f9d4c41..f542d18 100644
> --- a/isofs/inode.c
> +++ b/isofs/inode.c
> @@ -492,7 +492,7 @@ read_disknode (struct node *np, struct dirrect *dr,
> static error_t
> read_symlink_hook (struct node *np, char *buf)
> {
> - bcopy (np->dn->link_target, buf, np->dn_stat.st_size);
> + memcpy (buf, np->dn->link_target, np->dn_stat.st_size + 1);
> return 0;
> }
> error_t (*diskfs_read_symlink_hook) (struct node *, char *)
> --
> 1.9.0
>
--
Samuel
/* Halley */
(Halley's comment.)