libsemanage: fix fname[] initialization in test_utilities.c

There's no guaranty that last item in "char fname[]" will be a null character.
Fixes segfault on some systems:

  Test: semanage_nc_sort ...passedtest_semanage_findval: : Invalid argument
libsemanage-tests: TestRun.c:160: CU_assertImplementation: Assertion `((void *)0) != f_pCurTest' failed.
make[1]: *** [test] Aborted (core dumped)

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
Petr Lautrbach 2015-03-16 11:33:07 +01:00 committed by Stephen Smalley
parent 50788b155d
commit b6d5805c7a
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ void test_slurp_file_filter(void);
char fname[] = { char fname[] = {
'T', 'E', 'S', 'T', '_', 'T', 'E', 'M', 'P', '_', 'X', 'X', 'X', 'X', 'T', 'E', 'S', 'T', '_', 'T', 'E', 'M', 'P', '_', 'X', 'X', 'X', 'X',
'X', 'X' 'X', 'X', '\0'
}; };
int fd; int fd;
FILE *fptr; FILE *fptr;