2019-08-21 17:59 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004990AIAIpublic2015-11-08 13:55
Reporterlamer 
Assigned Toabma 
PrioritynormalSeveritycrashReproducibilityrandom
StatusresolvedResolutionfixed 
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.
Attached Files

-Relationships
+Relationships

-Notes

~0015320

abma (administrator)

Last edited: 2015-11-08 13:55

View 2 revisions

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

+Notes

-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 View Revisions
+Issue History