From: Bean Date: Wed, 18 Apr 2012 21:21:38 +0000 (+0200) Subject: * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1501ac21b030e9b251fa520e48648b7d214b25d2;p=grub2.git * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right place. --- diff --git a/ChangeLog b/ChangeLog index 88921d7b6..5e14b639c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-18 Bean + + * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right + place. + 2012-04-18 Vladimir Serbinenko * grub-core/kern/emu/hostdisk.c (open_device): New argument max. All diff --git a/grub-core/disk/ata.c b/grub-core/disk/ata.c index c90e86832..4555147c7 100644 --- a/grub-core/disk/ata.c +++ b/grub-core/disk/ata.c @@ -35,7 +35,7 @@ grub_ata_strncpy (grub_uint16_t *dst16, grub_uint16_t *src16, grub_size_t len) for (i = 0; i < len / 2; i++) *(dst16++) = grub_be_to_cpu16 (*(src16++)); - dst16[i] = 0; + *dst16 = 0; } static void