Issue Information
-
#008705
-
0 - None Assigned
-
New
Issue Confirmations
-
Yes (0)No (0)
0
UNT_FIREWALL + UNT_KAEN can cause crash when SA_LANDPROTECTOR is cast during race condition
Posted by Ancyker on 28 May 2015 - 04:42 PM
skill.c
The above is an assumption, as I did not test further. This was discovered by spamming firewall (and firepillar) on a player that had a Detale card.
switch (sg->unit_id) { case UNT_FIREWALL: case UNT_KAEN: { int count=0; const int x = bl->x, y = bl->y; if( sg->skill_id == GN_WALLOFTHORN && !map_flag_vs(bl->m) ) break; //Take into account these hit more times than the timer interval can handle. do skill->attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0); while(--src->val2 && x == bl->x && y == bl->y && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl)); if (src->val2<=0) skill->delunit(src); } break;If SA_LANDPROTECTOR is cast over a UNT_FIREWALL or UNT_KAEN unit during the while statements execution, the code will pull garbage data and crash.
The above is an assumption, as I did not test further. This was discovered by spamming firewall (and firepillar) on a player that had a Detale card.