]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Fri, 28 Oct 2005 03:14:33 +0000 (03:14 +0000)
committerokuji <okuji@localhost>
Fri, 28 Oct 2005 03:14:33 +0000 (03:14 +0000)
        From Timothy Baldwin:
        * commands/ls.c (grub_ls_list_files): Close FILE with
        grub_file_close.
        * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.

ChangeLog
commands/ls.c
kern/misc.c

index e98a52394728269619e1875ac3fc0af19aface9d..26848f59151d4858f2ee29cdde14fdd0b26c0327 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       From Timothy Baldwin:
+       * commands/ls.c (grub_ls_list_files): Close FILE with
+       grub_file_close.
+       * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
+
 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
 
        * include/grub/parser.h: New file.
index 51c8fef0cea748b800624ed637b08fb6ea7f4df9..96ac299a12cbb39366b65d31a18d25b468555f11 100644 (file)
@@ -130,7 +130,7 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
                grub_printf ("%-12d", file->size);
              
            }
-         (fs->close) (file);
+         grub_file_close (file);
        }
       else
        grub_printf ("%-12s", "DIR");
index 6ae2275b925028ecdab744a948d09337278f7853..3176f29e65ef90903e6cd6a1e93f97cc5947ee2d 100644 (file)
@@ -577,8 +577,9 @@ grub_vsprintf (char *str, const char *fmt, va_list args)
 
          if (p > fmt)
            {
-             char s[p - fmt];
+             char s[p - fmt + 1];
              grub_strncpy (s, fmt, p - fmt);
+             s[p - fmt] = 0;
              if (s[0] == '0')
                zerofill = '0';
              format1 = grub_strtoul (s, 0, 10);