2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00
This patch prevents the parser from segv'ing if neither of the expected
default profile directories exist (/etc/subdomain.d, /etc/apparmor.d).
A profile passed on the command line or via stdin will still load, so
long as -I/path/to/includes is passed for any relevant includes files.
This commit is contained in:
Steve Beattie
2006-04-28 03:26:57 +00:00
parent 543b642d1f
commit 0508ea0128
2 changed files with 4 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ int add_search_dir(char *dir)
return 0;
}
if (strlen(dir) <= 0)
if (!dir || strlen(dir) <= 0)
return 1;
t = malloc(strlen(dir) + 1);