Commit Graph

22 Commits (585f6aad333557153be659c2466068dd3e3eaf46)

Author SHA1 Message Date
lethosor e8d9a9d184
Fix out-of-bounds access in memscan.field_offset()
Fixes #1907
2021-08-10 11:26:06 -04:00
lethosor 2dccd1d0ff Add CheckedArray:__tostring() method 2016-08-22 23:18:30 -04:00
lethosor 0b6597ddb2 Stop field_offset from crashing due to missing vtables
Now, a pointer to NULL is cast to the type in question, avoiding the need to
call new() or delete() with potentially-misaligned types. Also,
virtual_identity::find has been tweaked to prevent it from crashing on NULL
vtable pointers.

This was suggested by Angavrilov.
2016-08-18 15:59:46 -04:00
lethosor ee7357b60e x86: fix vector validity check 2016-08-05 17:51:08 -04:00
lethosor e8fe72826f Add new integer types to memscan and update find-offsets 2016-07-29 00:05:12 -04:00
Vitaly Pronkin fe18f176f7 More 64-bit fixes
Cherry-picked from 7eb3ba6
- Lua update already done in e2c6350, 4dd411e
- Excluded library/modules/Buildings.cpp
2016-07-26 23:47:53 -04:00
lethosor b8bbf5f545 field_offset: Use actual type instances instead of reinterpret_cast(type, 1)
ui_build_selector is a virtual class as of 0.42.06, so reinterpret_cast-ing it
with bad addresses will crash. 'df.new(df.ui_build_selector)' works just fine.
2016-03-22 17:27:53 -04:00
Alexander Gavrilov 4902c577b3 Fix some crashes when running without globals and update structures. 2014-07-24 23:10:37 +04:00
Warmist 6be65690f7 Merge branch 'master' of https://github.com/angavrilov/dfhack into experimental-dontmerge 2012-11-02 20:29:27 +02:00
Warmist da92fb9a1c Start of dfusion module. Fixed small error in memscan.lua and start of custom embark command. 2012-10-17 21:43:44 +03:00
Alexander Gavrilov 33aead34b4 Implement a more automated search mode based on keys for some globals. 2012-10-02 19:53:16 +04:00
Warmist 6fc10fc268 Fixed embark anywhere to use more sane code segment search 2012-09-05 21:52:54 +03:00
Warmist 532839a4d5 Embark anywhere ported 2012-09-01 10:54:45 +03:00
Warmist 7cabf1b843 Small bug fix 2012-09-01 10:13:08 +03:00
Warmist d784d4bc40 Static code segment search for memscan.lua 2012-09-01 10:05:31 +03:00
Alexander Gavrilov 65e82f7c12 Support controllable error presentation verbosity in lua code.
Use qerror to squash stack traces and location prefix.
2012-06-22 16:36:50 +04:00
Alexander Gavrilov 752da9ced5 Move formatting newly-found globals for symbols.xml to lua code. 2012-06-21 21:26:25 +04:00
Alexander Gavrilov f207714d42 Add finders for enabler, gps and init. 2012-06-21 21:08:36 +04:00
Alexander Gavrilov ed4acbdedb Add a searcher for current_weather, using a prepared save. 2012-06-20 10:12:26 +04:00
Alexander Gavrilov bd5b675fa5 Add ui_menu_width finder, tweak instructions, and add a case for win exe. 2012-06-18 21:11:54 +04:00
Alexander Gavrilov dc6cb61979 Add more offset finders to the script. 2012-06-17 18:44:59 +04:00
Alexander Gavrilov 67536da2fe Add an interactive script finding a limited subset of linux offsets. 2012-06-16 19:51:15 +04:00