[apparmor] linux-4.5/security/apparmor/match.c:64: possible copying of uninit fields ?

Ben Hutchings ben at decadent.org.uk
Tue Mar 15 11:45:07 UTC 2016


On Tue, 2016-03-15 at 11:02 +0000, David Binderman wrote:
> Hello there,
> 
> [linux-4.5/security/apparmor/match.c:64]: (error) Uninitialized struct member: th.td_hilen
> [linux-4.5/security/apparmor/match.c:64]: (error) Uninitialized struct member: th.td_data
>
> Source code is
> 
>        *table = th;
> 
> It looks to me like local struct th has only been partly initialised.
[...]

Yes, but:

- td_hilen is, AFAICS, completely unused in this version of AppArmor
 
(so should presumably be removed from the struct definition)
- td_data
has zero size, so this warning seems incorrect

Ben.
		 	   		  
-- 
Ben Hutchings
Hoare's Law of Large Problems:
        Inside every large problem is a small problem struggling to get out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160315/eec3f638/attachment.pgp>


More information about the AppArmor mailing list