+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
/* 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
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] == '/')