2008-03-02 Bean <bean123ch@gmail.com>
* fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of symlink_buffer.
This commit is contained in:
parent
90fd32d1bd
commit
2b89344ec4
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-03-02 Bean <bean123ch@gmail.com>
|
||||
|
||||
* fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
|
||||
symlink_buffer.
|
||||
|
||||
2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
|
||||
|
||||
* DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
|
||||
|
|
|
@ -659,7 +659,7 @@ grub_reiserfs_read_symlink (grub_fshelp_node_t node)
|
|||
>> GRUB_DISK_SECTOR_BITS);
|
||||
offset = grub_le_to_cpu16 (found.header.item_location);
|
||||
|
||||
symlink_buffer = grub_malloc (len);
|
||||
symlink_buffer = grub_malloc (len + 1);
|
||||
if (! symlink_buffer)
|
||||
goto fail;
|
||||
|
||||
|
@ -667,6 +667,7 @@ grub_reiserfs_read_symlink (grub_fshelp_node_t node)
|
|||
if (grub_errno)
|
||||
goto fail;
|
||||
|
||||
symlink_buffer[len] = 0;
|
||||
return symlink_buffer;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Reference in a new issue