# HG changeset patch # User Glenn Morris # Date 1272682721 25200 # Node ID f4b0e53580918f7166fcfaa1026b9596ec7a6f89 # Parent b67d7273ec18360677ef3aaba00fa4dbff725600 * src/fileio.c (Ffile_selinux_context): Context functions may return null. diff -r b67d7273ec18 -r f4b0e5358091 src/ChangeLog --- a/src/ChangeLog Fri Apr 30 22:19:40 2010 -0400 +++ b/src/ChangeLog Fri Apr 30 19:58:41 2010 -0700 @@ -1,3 +1,7 @@ +2010-05-01 Karel Klíč + + * fileio.c (Ffile_selinux_context): Context functions may return null. + 2010-04-30 Dan Nicolaescu * s/gnu.h (POSIX_SIGNALS): diff -r b67d7273ec18 -r f4b0e5358091 src/fileio.c --- a/src/fileio.c Fri Apr 30 22:19:40 2010 -0400 +++ b/src/fileio.c Fri Apr 30 19:58:41 2010 -0700 @@ -2918,10 +2918,14 @@ if (conlength > 0) { context = context_new (con); - values[0] = build_string (context_user_get (context)); - values[1] = build_string (context_role_get (context)); - values[2] = build_string (context_type_get (context)); - values[3] = build_string (context_range_get (context)); + if (context_user_get (context)) + values[0] = build_string (context_user_get (context)); + if (context_role_get (context)) + values[1] = build_string (context_role_get (context)); + if (context_type_get (context)) + values[2] = build_string (context_type_get (context)); + if (context_range_get (context)) + values[3] = build_string (context_range_get (context)); context_free (context); } if (con)