grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* memcpy() in lib/fdt.c
@ 2013-12-10 15:38 Leif Lindholm
  2013-12-10 15:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Leif Lindholm @ 2013-12-10 15:38 UTC (permalink / raw)
  To: grub-devel

Hi,

There is a typo in fdt.c, invoking memcpy() rather than grub_memcpy().
Suggested trivial fix:

diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c
index 9c886fc..9f34dc7 100644
--- a/grub-core/lib/fdt.c
+++ b/grub-core/lib/fdt.c
@@ -219,8 +219,8 @@ static int rearrange_blocks (void *fdt, unsigned int clearan
   grub_fdt_set_off_dt_strings (fdt, off_dt_strings);
 
   /* Copy reordered blocks back to fdt. */
-  memcpy (fdt_ptr + off_mem_rsvmap, tmp_fdt + off_mem_rsvmap,
-         grub_fdt_get_totalsize (fdt) - off_mem_rsvmap);
+  grub_memcpy (fdt_ptr + off_mem_rsvmap, tmp_fdt + off_mem_rsvmap,
+               grub_fdt_get_totalsize (fdt) - off_mem_rsvmap);
 
   grub_free(tmp_fdt);
   return 0;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: memcpy() in lib/fdt.c
  2013-12-10 15:38 memcpy() in lib/fdt.c Leif Lindholm
@ 2013-12-10 15:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-12-10 15:55 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

Go ahead
On 10.12.2013 16:38, Leif Lindholm wrote:
> Hi,
> 
> There is a typo in fdt.c, invoking memcpy() rather than grub_memcpy().
> Suggested trivial fix:
> 
> diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c
> index 9c886fc..9f34dc7 100644
> --- a/grub-core/lib/fdt.c
> +++ b/grub-core/lib/fdt.c
> @@ -219,8 +219,8 @@ static int rearrange_blocks (void *fdt, unsigned int clearan
>    grub_fdt_set_off_dt_strings (fdt, off_dt_strings);
>  
>    /* Copy reordered blocks back to fdt. */
> -  memcpy (fdt_ptr + off_mem_rsvmap, tmp_fdt + off_mem_rsvmap,
> -         grub_fdt_get_totalsize (fdt) - off_mem_rsvmap);
> +  grub_memcpy (fdt_ptr + off_mem_rsvmap, tmp_fdt + off_mem_rsvmap,
> +               grub_fdt_get_totalsize (fdt) - off_mem_rsvmap);
>  
>    grub_free(tmp_fdt);
>    return 0;
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-10 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 15:38 memcpy() in lib/fdt.c Leif Lindholm
2013-12-10 15:55 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).