]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right
authorBean <bean123ch@gmail.com>
Wed, 18 Apr 2012 21:21:38 +0000 (23:21 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 18 Apr 2012 21:21:38 +0000 (23:21 +0200)
place.

ChangeLog
grub-core/disk/ata.c

index 88921d7b66ce63e31ca9a21e0071db1acc548ed6..5e14b639cd511e92b26cbfc07698ce6028bd2179 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-18  Bean  <bean123ch@gmail.com>
+
+       * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right
+       place.
+
 2012-04-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/kern/emu/hostdisk.c (open_device): New argument max. All
index c90e86832ca32b4a7d21107d68e6947b32150eac..4555147c72a045598df9a29753f8602ce20feb90 100644 (file)
@@ -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