summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-09-22 18:36:45 +0200
committerthiagoftsm <thiagoftsm@gmail.com>2019-09-22 16:36:45 +0000
commit60e21cda913e889e7ce83e915830cc42798be37b (patch)
tree95992a047a445a489e3741287f1d72aa57f827c4 /health
parent617218ad374199eabd0c7e5e1fe96a20509661be (diff)
Correct read length of silencers file (#6909)
Diffstat (limited to 'health')
-rw-r--r--health/health.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/health/health.c b/health/health.c
index ed43b146c2..592e6a5be2 100644
--- a/health/health.c
+++ b/health/health.c
@@ -51,7 +51,7 @@ void health_silencers_init(void) {
off_t length = (off_t) ftell(fd);
fseek(fd, 0 , SEEK_SET);
- if (length && length < HEALTH_SILENCERS_MAX_FILE_LEN) {
+ if (length > 0 && length < HEALTH_SILENCERS_MAX_FILE_LEN) {
char *str = mallocz((length+1)* sizeof(char));
if(str) {
size_t copied;