fix invalid substitute of [1] for flexible array member in glob
This commit is contained in:
1 parent
7b384c42b7
commit
e2552581bc
1 file changed
+2
-2
+2
-2
@@ -11,7 +11,7 @@
|
||||
struct match
|
||||
{
|
||||
struct match *next;
|
||||
char name[1];
|
||||
char name[];
|
||||
};
|
||||
|
||||
static int is_literal(const char *p, int useesc)
|
||||
@@ -37,7 +37,7 @@ static int is_literal(const char *p, int useesc)
|
||||
|
||||
static int append(struct match **tail, const char *name, size_t len, int mark)
|
||||
{
|
||||
struct match *new = malloc(sizeof(struct match) + len + 1);
|
||||
struct match *new = malloc(sizeof(struct match) + len + 2);
|
||||
if (!new) return -1;
|
||||
(*tail)->next = new;
|
||||
new->next = NULL;
|
||||
|
||||
Reference in new issue
Block a user