| Author |
Message |
alehandro
Joined: 16 Nov 2010 Posts: 35
|
Posted: Tue Nov 16, 2010 12:22 am Post subject: Object reference not set to an instance of object |
|
|
Hi, interesting bug found
while decompiling one deobfuscated dll I've found that Reflector cant handle a tricky case.
Description:
Please refer to the assembly.
For some methods of c0000a0, for example, "aqc10xGJ6", it has a custom attribute:
.custom /*0C00052B:060009FA*/ instance void NS021.c0000a0/*020000A0*//attr161Attribute/*020000A1*/::.ctor(object) /* 060009FA */
= {object(type(class 'c0000a2[[System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]][]'))}
// = ( 01 00 50 67 63 30 30 30 30 61 32 5B 5B 53 79 73 // ..Pgc0000a2[[Sys
// 74 65 6D 2E 4F 62 6A 65 63 74 2C 20 6D 73 63 6F // tem.Object, msco
// 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 32 2E // rlib, Version=2.
// 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E // 0.0.0, Culture=n
// 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 // eutral, PublicKe
// 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 // yToken=b77a5c561
// 39 33 34 65 30 38 39 5D 5D 5B 5D 00 00 ) // 934e089]][]..
When .Net Reflector read this custom attribute, it try to parse "b77a5c561934e089]]" as PublicKeyToken, so internal exception occurs and prevent it from decompiling the method.
If you remove the custom attribute, the method should be ok in Reflector.
here is the deobfuscated assembly
http://www.multiupload.com/JG51HXCKME
Please let me know if Reflector could understand that custom attribute is not a real PublicKeyToken so it stop crashing on lots of assemblies! |
|
| Back to top |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
Posted: Tue Nov 16, 2010 9:25 am Post subject: |
|
|
Thanks for reporting this.
As you say, the token parsing code is trying to parse the hex values of the token with the ]] appended.
I've logged it in our bug tracking database as issue 774. |
|
| Back to top |
|
 |
alehandro
Joined: 16 Nov 2010 Posts: 35
|
Posted: Tue Nov 16, 2010 12:50 pm Post subject: Re: |
|
|
| Clive Tong wrote: |
Thanks for reporting this.
As you say, the token parsing code is trying to parse the hex values of the token with the ]] appended.
I've logged it in our bug tracking database as issue 774. |
Hi, Clive
Thanks for your reply
Are there any schedules for releasing new version? |
|
| Back to top |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
Posted: Tue Nov 16, 2010 2:47 pm Post subject: |
|
|
| It should be fixed for the next EAP release. That will probably be in the next couple of months. |
|
| Back to top |
|
 |
alehandro
Joined: 16 Nov 2010 Posts: 35
|
Posted: Tue Nov 16, 2010 3:05 pm Post subject: Re: |
|
|
| Clive Tong wrote: |
| It should be fixed for the next EAP release. That will probably be in the next couple of months. |
Last question: it'll be fixed for both products (Refl & Refl Pro) ? |
|
| Back to top |
|
 |
Clive Tong
Joined: 04 Dec 2008 Posts: 281
|
Posted: Tue Nov 16, 2010 3:10 pm Post subject: |
|
|
| Yes. |
|
| Back to top |
|
 |
nmpham
Joined: 28 Jun 2005 Posts: 12
|
Posted: Wed Nov 17, 2010 9:57 am Post subject: Re: |
|
|
| Clive Tong wrote: |
| It should be fixed for the next EAP release. That will probably be in the next couple of months. |
Can we have a hotfix for this, because Reflector crashes on a lot of assembly now |
|
| Back to top |
|
 |
|