diff options
author | 2015-08-11 12:29:58 +0100 | |
---|---|---|
committer | 2015-08-11 12:29:58 +0100 | |
commit | 37fbd141470c0bde506d1aff2dec8168faf30c1f (patch) | |
tree | 0989f0341b8175760ebde595435df9705de3c14c | |
parent | fixing issues 2 and 4 (diff) | |
download | firejail-37fbd141470c0bde506d1aff2dec8168faf30c1f.tar.gz firejail-37fbd141470c0bde506d1aff2dec8168faf30c1f.tar.zst firejail-37fbd141470c0bde506d1aff2dec8168faf30c1f.zip |
Fix potential null pointer dereference in netfilter
-rw-r--r-- | src/firejail/netfilter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c index dbed4ac30..fd8a9b2f3 100644 --- a/src/firejail/netfilter.c +++ b/src/firejail/netfilter.c | |||
@@ -67,9 +67,9 @@ void netfilter(const char *fname) { | |||
67 | } | 67 | } |
68 | 68 | ||
69 | filter = malloc(s.st_size + 1); // + '\0' | 69 | filter = malloc(s.st_size + 1); // + '\0' |
70 | memset(filter, 0, s.st_size + 1); | ||
71 | if (!filter) | 70 | if (!filter) |
72 | errExit("malloc"); | 71 | errExit("malloc"); |
72 | memset(filter, 0, s.st_size + 1); | ||
73 | 73 | ||
74 | /* coverity[toctou] */ | 74 | /* coverity[toctou] */ |
75 | FILE *fp = fopen(fname, "r"); | 75 | FILE *fp = fopen(fname, "r"); |