From 1501ac21b030e9b251fa520e48648b7d214b25d2 Mon Sep 17 00:00:00 2001 From: Bean Date: Wed, 18 Apr 2012 23:21:38 +0200 Subject: [PATCH] * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right place. --- ChangeLog | 5 +++++ grub-core/disk/ata.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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