xsm: fix printf format string for strlen result

strlen returns size_t:

policydb.c: In function ‘policydb_read’:
policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’

This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit Xen
4.2.x. I expect it affects ARM too.

Reported-by: Dharshini Tharmaraj <dharshinitharmaraj@gmail.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
This commit is contained in:
Ian Campbell authored and Jan Beulich committed 2013-04-30 09:08:08 +02:00
1 parent 0352856935
commit b3f685edb7
1 file changed
+1 -1
+1 -1
View File
@@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp)
if ( len != strlen(POLICYDB_STRING) )
{
printk(KERN_ERR "Flask: policydb string length %d does not "
"match expected length %lu\n",
"match expected length %zu\n",
len, strlen(POLICYDB_STRING));
goto bad;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.