mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/kern/emu/hostfs.c (is_dir): Remove variable length arrays.
This commit is contained in:
1 parent
621e167fd6
commit
eec893ae49
2 files changed
+9
-2
No files matched your search
@@ -1,3 +1,7 @@
|
|||||||
|
2013-11-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/hostfs.c (is_dir): Remove variable length arrays.
|
||||||
|
|
||||||
2013-11-29 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-11-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub-fstest.c: Remove variable length arrays.
|
* util/grub-fstest.c: Remove variable length arrays.
|
||||||
|
|||||||
@@ -39,8 +39,9 @@ is_dir (const char *path, const char *name)
|
|||||||
{
|
{
|
||||||
int len1 = strlen(path);
|
int len1 = strlen(path);
|
||||||
int len2 = strlen(name);
|
int len2 = strlen(name);
|
||||||
|
int ret;
|
||||||
|
|
||||||
char pathname[len1 + 1 + len2 + 1 + 13];
|
char *pathname = xmalloc (len1 + 1 + len2 + 1 + 13);
|
||||||
strcpy (pathname, path);
|
strcpy (pathname, path);
|
||||||
|
|
||||||
/* Avoid UNC-path "//name" on Cygwin. */
|
/* Avoid UNC-path "//name" on Cygwin. */
|
||||||
@@ -49,7 +50,9 @@ is_dir (const char *path, const char *name)
|
|||||||
|
|
||||||
strcat (pathname, name);
|
strcat (pathname, name);
|
||||||
|
|
||||||
return grub_util_is_directory (pathname);
|
ret = grub_util_is_directory (pathname);
|
||||||
|
free (pathname);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct grub_hostfs_data
|
struct grub_hostfs_data
|
||||||
|
|||||||
Reference in new issue
Block a user