[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] [PATCH] xsm: fix printf format string for strlen result



>>> On 22.04.13 at 14:28, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> Adding Keir + Jan.

Would really be Daniel to give his ack here. It's a trivial enough
change, so if I don't see an ack soon, I'll probably commit this
anyway...

Jan

> On Mon, 2013-04-15 at 14:36 +0100, Ian Campbell wrote:
>> 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@xxxxxxxxx>
>> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>> Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
>> ---
>>  xen/xsm/flask/ss/policydb.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c
>> index fefcd59..bdec4ac 100644
>> --- a/xen/xsm/flask/ss/policydb.c
>> +++ b/xen/xsm/flask/ss/policydb.c
>> @@ -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;
>>      }



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.