SELinuxProject / selint

Static code analysis of refpolicy style SELinux policy
Apache License 2.0
38 stars 17 forks source link

Check for argument counter of zero #220

Closed cgzones closed 2 years ago

cgzones commented 2 years ago

Reject invocations with an argument counter of zero, in which case the subsequent allocation

char **paths = malloc(sizeof(char *) * (unsigned)argc - (unsigned)optind + 2);

will cause a crash in fts_read(3).

dburgener commented 2 years ago

Merged, thanks!