[Mono-devel-list] Patch for faster creation of default evidences

Sebastien Pouliot sebastien at ximian.com
Fri Nov 12 14:16:26 EST 2004


Hello Ben,

On Fri, 2004-11-12 at 12:13 -0500, Ben Maurer wrote:
> > Hello,
> >
> > My CAS changes are getting big so I've broken some (non core) fixes in
> > smaller patches. This should ease the reviews ;-)
> +        if (refass && refass->assembly && refass->assembly->image) {
> When do these fail?

When NULL - I'm not a trusting person ;-)

>                 MonoCLIImageInfo *iinfo =
> refass->assembly->image->image_info;
> +                if (iinfo && &iinfo) {
> 
> What is &iinfo. Of course that is always going to have an address on the
> stack!
> +                        MonoDotNetHeader *header = &iinfo->cli_header;
> +                        if (header) {
> This condition will never fail

Right. It was a cheap copy-n-paste of existing Mono code where I added
checks (a little too strongly).

> + return ((de->rva != 0) && (de->size > 8));
> What does de->size > 8 mean? What is special about that size?

That's the size of the first* Authenticode header which we don't really
requires. It's already commented in the authenticode (managed) code but
I'll add a one-liner there.

* It's kind of useless because it's duplicated inside the following
ASN.1 structure but it let ASN.1-ignorant software (or function ;)
determine if the entry is ok.

Thanks
-- 
Sebastien Pouliot  <sebastien at ximian.com>
blog: http://pages.infinit.net/ctech/poupou.html




More information about the Mono-devel-list mailing list