ubi.com    Forums  Hop To Forum Categories  Beowulf  Hop To Forums  Beowulf    some bugs from pc
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
sorry,my englisg is very bad,please allow i speak chinese.
我在玩这个游戏的过程中,突然弹出来一个错误对话框。由于职业的原因,习惯性的点击了“调试”按钮,启动了调试工具,以下数据来自调试工具:
00773A80 /$ 57 push edi
00773A81 |. 8B7C24 08 mov edi, dword ptr [esp+8]
00773A85 |. 833F 00 cmp dword ptr [edi], 0
00773A88 |. 75 44 jnz short 00773ACE
00773A8A |. 837F 04 00 cmp dword ptr [edi+4], 0
00773A8E |. 74 35 je short 00773AC5
00773A90 |. 56 push esi
00773A91 |. E8 3A3BFFFF call 007675D0
00773A96 |. 8B77 18 mov esi, dword ptr [edi+18]
00773A99 |. E8 323BFFFF call 007675D0
00773A9E |. 8B40 08 mov eax, dword ptr [eax+8]
00773AA1 |. C1E6 04 shl esi, 4
00773AA4 |. 8B4C06 04 mov ecx, dword ptr [esi+eax+4]
00773AA8 |. 8B41 04 mov eax, dword ptr [ecx+4]
00773AAB |. 8D14C5 000000>lea edx, dword ptr [eax*8]
00773AB2 |. 2BD0 sub edx, eax
00773AB4 |. 8B47 14 mov eax, dword ptr [edi+14]
00773AB7 |. 8B0C95 6CE895>mov ecx, dword ptr [edx*4+95E86C]
00773ABE |. 50 push eax
00773ABF |. FFD1 call ecx
00773AC1 |. 83C4 04 add esp, 4
00773AC4 |. 5E pop esi
00773AC5 |> 57 push edi
00773AC6 |. E8 65EEFFFF call 00772930
00773ACB |. 83C4 04 add esp, 4
00773ACE |> 5F pop edi
00773ACF \. C3 retn

调试工具的断点在
00773AA8 |. 8B41 04 mov eax, dword ptr [ecx+4]

处,此刻ecx的值为0x00000000。
这里ecx应该是以指针,此时的值为NULL。应该是指针非法引用了。虽然我不知道是什么原因导致的ecx为NULL,但对于指针操作,常见的非空比较应该是有的吧,但这里却没有。包括
00773A99 |. E8 323BFFFF call 007675D0
00773A9E |. 8B40 08 mov eax, dword ptr [eax+8]
这两句也是,不检测eax的合法性直接拿来就用,是很危险的。我看过了call 007675D0这个函数,发现这个函数在某种情况下是要返回NULL的。
后来我干脆解析了游戏主程序,发现了很多地方都存在这样的问题。
这个游戏是个好游戏,但这个游戏的编码水平确实有点让人不敢恭维,还希望贵公司的程序员认真反省反省,多做出点为玩家负责的精品。
 
Posts: 1 | Registered: Fri November 23 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

ubi.com    Forums  Hop To Forum Categories  Beowulf  Hop To Forums  Beowulf    some bugs from pc

Terms of Use