[Mono-dev] [Patch] AssemblyName ctor (yes, again)
Sebastien Pouliot
sebastien.pouliot at gmail.com
Thu Aug 25 13:36:56 EDT 2005
On Thu, 2005-25-08 at 15:42 +0200, Paolo Molaro wrote:
> > @@ -1197,8 +1211,35 @@
> > aname->culture = g_strdup (culture);
> > }
> >
> > - if (token && strncmp (token, "null", 4) != 0)
> > + if (token && strncmp (token, "null", 4) != 0) {
> > + if (strlen (token) != MONO_PUBLIC_KEY_TOKEN_LENGTH - 1)
> > + return FALSE;
> > +
> > g_strlcpy ((char*)aname->public_key_token, token, MONO_PUBLIC_KEY_TOKEN_LENGTH);
> > + }
> > +
> > + if (key && strncmp (key, "null", 4) != 0) {
> > + gchar *arr, *tok, *encoded;
> > + int i, j;
> > +
> > + if (strlen (key) != MONO_PUBLIC_KEY_LENGTH)
> > + return FALSE;
>
> Can't the length change based on the flags? Sebastien?
The structure is a CryptoAPI blob who's size change only if the key
length change.
However strongnames can now be bigger than 1024 bits (on 2.0). We don't
support that (yet) and we'll have to change some assumptions in the code
to do so. Anyway we better start now...
Note: but this shouldn't affect the public key tokens
--
Sebastien
More information about the Mono-devel-list
mailing list