* grub-core/kern/xen/init.c (grub_xenstore_write_file): Don't add

\0 to all files.

	Reported by: M A Young.
This commit is contained in:
Vladimir Serbinenko 2013-11-14 22:40:50 +01:00
parent da5ed5cf6b
commit e1aa5b6620
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2013-11-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/xen/init.c (grub_xenstore_write_file): Don't add
\0 to all files.
Reported by: M A Young.
2013-11-14 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/osdep/bsd/hostdisk.c (grub_util_get_fd_size_os): Fix * grub-core/osdep/bsd/hostdisk.c (grub_util_get_fd_size_os): Fix

View file

@ -256,11 +256,10 @@ grub_xenstore_write_file (const char *dir, const void *buf, grub_size_t len)
grub_memset (&msg, 0, sizeof (msg)); grub_memset (&msg, 0, sizeof (msg));
msg.type = XS_WRITE; msg.type = XS_WRITE;
msg.len = dirlen + len + 1; msg.len = dirlen + len;
grub_xen_store_send (&msg, sizeof (msg)); grub_xen_store_send (&msg, sizeof (msg));
grub_xen_store_send (dir, dirlen); grub_xen_store_send (dir, dirlen);
grub_xen_store_send (buf, len); grub_xen_store_send (buf, len);
grub_xen_store_send ("", 1);
grub_xen_store_recv (&msg, sizeof (msg)); grub_xen_store_recv (&msg, sizeof (msg));
resp = grub_malloc (msg.len + 1); resp = grub_malloc (msg.len + 1);
if (!resp) if (!resp)