diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2023-11-14 00:53:00 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2023-11-14 00:59:56 +0100 |
commit | f35228177112c1bce0016dbdd0471aca35608b2b (patch) | |
tree | 4384afae2096634e1b80c016442f441ce5498488 /src | |
parent | 557548b352134c9859aa92e969f9a7970bbbcb2c (diff) | |
download | bindfs-f35228177112c1bce0016dbdd0471aca35608b2b.tar.gz |
permchain.c: Handle malloc failure in add_chmod_rule_to_permchain
Diffstat (limited to 'src')
-rw-r--r-- | src/permchain.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/permchain.c b/src/permchain.c index b95bd8b..ad32f9d 100644 --- a/src/permchain.c +++ b/src/permchain.c @@ -67,6 +67,8 @@ static int add_chmod_rule_to_permchain(const char *start, const char *end, int len = end - start; char *buf = malloc((len + 1) * sizeof(char)); + if (buf == NULL) + return -1; const char *p = buf; enum {LHS, RHS} state = LHS; |