projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b384c4
)
fix invalid substitute of [1] for flexible array member in glob
author
Rich Felker
<dalias@aerifal.cx>
Thu, 11 Oct 2018 18:23:14 +0000
(14:23 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 11 Oct 2018 18:23:14 +0000
(14:23 -0400)
src/regex/glob.c
patch
|
blob
|
history
diff --git
a/src/regex/glob.c
b/src/regex/glob.c
index 746da77d0f43a943632b2b320deb73d28cc10215..98636295ee1105db11621a7e1fa4fbe0233af567 100644
(file)
--- a/
src/regex/glob.c
+++ b/
src/regex/glob.c
@@
-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;