[Mono-bugs] [Bug 80225][Nor] Changed - AssemblyName.GetPublicKey() should not return null

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jul 4 14:26:17 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by miguel at ximian.com.


--- shadow/80225	2007-07-04 04:54:57.000000000 -0400
+++ shadow/80225.tmp.1619	2007-07-04 14:26:17.000000000 -0400
@@ -150,6 +150,22 @@
 PublicKeyToken part of the Fullname however seems to be consistent.
 ------- Additional Comments From lupus at ximian.com  2007-07-04 04:54 -------
 There aren't that many calls where we call GetPublicKey(): we should
 check them for null checks and make sure we also check for Length == 0.
 Also, GetPublicKeyToken() has likely similar issues.
+------- Additional Comments From miguel at ximian.com  2007-07-04 14:26 -------
+Ok, I just lost a very nice post due to this old bugzilla installation.
+I went to codesearch.google.com, and the summary is that there are
+various apps testing for null, some others test for null and length
+zero and some only check for length.
+Error handling of using these routines is not anyone's forte it seems.
+  IKVM was testing both null and length, and the issue is: was this
+added for Mono only, or did that ever happen on MS?
+Also, notice that SetPublicKey is allowed to take a null (at least no
+reported exceptions are thrown if a null is passed) which means that
+it could be returned from AssemblyName.

More information about the mono-bugs mailing list