the latest version of Clang/LLVM for the world and kernel

John-Mark Gurney jmg at funkthat.com
Fri Feb 15 22:31:51 UTC 2013


Dimitry Andric wrote this message on Fri, Feb 15, 2013 at 16:57 +0100:
> >/usr/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/md5-internal.c:191:30: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
> >*     os_memset(ctx, 0, sizeof(ctx));     /* In case it's sensitive */
> >*                              ^~~
> >There just has to be an organization behind these backdoors...
> 
> No, this is just a very common error.  The idiom is either:
> 
>   memset(&object, 0, sizeof object);
> 
> or
> 
>   memset(&pointer, 0, sizeof *pointer);
> 
> but apparently it is difficult to choose the right one. :)

I assume you mean:
	memset(pointer, 0, sizeof *pointer);

:)

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-current mailing list