View Issue Details

IDProjectCategoryView StatusLast Update
0004990AIAIpublic2015-11-08 13:55
Reporterlamer Assigned Toabma  
PrioritynormalSeveritycrashReproducibilityrandom
Status resolvedResolutionfixed 
Summary0004990: [KAIK] Possible memory corruption
DescriptionI assume MicroPather has wrong boundary test and thus leads to memory corruption or endless loops.
Steps To ReproduceSpawn KAIK's units at the map edge. Hope for the best.
Additional Informationhttps://github.com/spring/KAIK/blob/3e99fa1360d8e0e9a1c8a125a5c655daa77aa5ee/MicroPather.cpp#L330
https://github.com/spring/KAIK/blob/3e99fa1360d8e0e9a1c8a125a5c655daa77aa5ee/MicroPather.cpp#L370

Those 2 places should look like:
    if (x == 0)
        x = 1;
    else if (x == mapSizeX - 1)
        x = mapSizeX - 2;

    if (y == 0)
        y = 1;
    else if (y == mapSizeY - 1)
        y = mapSizeY - 2;

Or even use (x<=0) ... (x>=mapSizeX-1) ?
TagsNo tags attached.

Activities

abma

2015-11-08 13:54

administrator   ~0015320

Last edited: 2015-11-08 13:55

https://github.com/spring/KAIK/commit/fc45865422d9365c96cf74ab07d015c3f89a4526

Issue History

Date Modified Username Field Change
2015-11-06 13:29 lamer New Issue
2015-11-08 13:54 abma Note Added: 0015320
2015-11-08 13:54 abma Status new => resolved
2015-11-08 13:54 abma Resolution open => fixed
2015-11-08 13:54 abma Assigned To => abma
2015-11-08 13:55 abma Note Edited: 0015320