Skip to content

Commit

Permalink
permissions: fix possible buffer overflow
Browse files Browse the repository at this point in the history
Fixes Coverity CID #40880
  • Loading branch information
razvancrainea committed Jul 21, 2020
1 parent bb284f1 commit 8b410a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/permissions/parse_config.c
Expand Up @@ -122,6 +122,10 @@ static int parse_expression(char *str, expression **e, expression **e_exceptions
}
} else {
/* no exception */
if (strlen(str) > LINE_LENGTH) {
LM_ERR("rule too long [%s]!\n", str);
return -1;
}
strcpy(str2, str);
*e_exceptions = NULL;
}
Expand Down

0 comments on commit 8b410a7

Please sign in to comment.