]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2005-01-21 Marco Gerards <metgerards@student.han.nl>
authormarco_g <marco_g@localhost>
Fri, 21 Jan 2005 22:34:18 +0000 (22:34 +0000)
committermarco_g <marco_g@localhost>
Fri, 21 Jan 2005 22:34:18 +0000 (22:34 +0000)
* fs/minix.c (grub_minix_find_file): Reserve more space for
`fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
`grub_strncpy' to copy `path' into it.

ChangeLog
fs/minix.c

index cacf9a0f656e0f0303d18e4bcf525881beefdae7..8593393a1a84d088ce242637b65f29b9ee6014cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-21  Marco Gerards  <metgerards@student.han.nl>
+
+       * fs/minix.c (grub_minix_find_file): Reserve more space for
+       `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
+       `grub_strncpy' to copy `path' into it.
+
 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
 
        Add the loopback device, a device via which files can be accessed
index 1639c8f0a17465f05b931e0283d7caddd2ec66a8..dc1489a0393b933beada8b3edaf79e2a44854045 100644 (file)
@@ -1,7 +1,7 @@
 /* minix.c - The minix filesystem, version 1 and 2.  */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2004  Free Software Foundation, Inc.
+ *  Copyright (C) 2004, 2005  Free Software Foundation, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -325,13 +325,13 @@ grub_minix_lookup_symlink (struct grub_minix_data *data, int ino)
 static grub_err_t
 grub_minix_find_file (struct grub_minix_data *data, const char *path)
 {
-  char fpath[grub_strlen (path)];
+  char fpath[grub_strlen (path) + 1];
   char *name = fpath;
   char *next;
   unsigned int pos = 0;
   int dirino;
   
-  grub_strncpy (fpath, path, grub_strlen (path));
+  grub_strcpy (fpath, path);
   
   /* Skip the first slash.  */
   if (name[0] == '/')