empserver/include
Markus Armbruster 0cc474bd6d Fix crash bug in satellite maps
The value of diffx() had the wrong sign when the arguments differed by
WORLD_X / 2.  Same for diffy() and WORLD_Y / 2.  satmap() used them to
find the vector from map center to ship or land unit to put on the
map, and got incorrect values for ships and land units directly
opposite to the center in x or y.  The bug made satmap() read a
pointer out bounds of its malloced radbuf[], and then write through
that with unpredictable consequences.

Broken in 4.2.12.  The original bug was in Empire 1.1: it
miscalculated where to put ships on the map (no crash).  An incomplete
fix for radmap() and satmap() appeared in Chainsaw 2 (still no crash).
radmap() got fixed correctly in Chainsaw 3, but satmap() was
forgotten.  That one got "fixed" in 4.2.7, and again in 4.2.12, but
both "fixes" were flawed and could crash.

Fix by backing out the flawed fixes and adopting the fix from radmap()
instead.
2008-05-13 08:36:06 +02:00
..
budg.h Update copyright notice 2008-01-19 10:15:37 +01:00
com.h Update copyright notice 2008-01-19 10:15:37 +01:00
combat.h Update copyright notice 2008-01-19 10:15:37 +01:00
commands.h Update copyright notice 2008-01-19 10:15:37 +01:00
commodity.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
damage.h Update copyright notice 2008-01-19 10:15:37 +01:00
distribute.h Update copyright notice 2008-01-19 10:15:37 +01:00
econfig-spec.h Remove option FUEL 2008-05-12 09:25:20 +02:00
empio.h Update copyright notice 2008-01-19 10:15:37 +01:00
empobj.h Update known contributors comments 2008-03-14 20:25:44 +01:00
empthread.h Update copyright notice 2008-01-19 10:15:37 +01:00
file.h Update known contributors comments 2008-03-14 20:25:44 +01:00
game.h Start the Empire clock on first break or update 2008-05-10 21:52:19 +02:00
ioqueue.h Update copyright notice 2008-01-19 10:15:37 +01:00
item.h Replace some typedef names by enum tags. 2008-03-14 20:25:42 +01:00
journal.h Journal the PRNG seed 2008-03-17 19:08:34 +01:00
land.h Remove option FUEL 2008-05-12 09:25:20 +02:00
loan.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
lost.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
lwp.h Semaphores are no longer used, remove: 2007-02-08 12:29:16 +00:00
map.h Get rid of src/lib/gen/copy.c 2008-02-03 07:44:20 +01:00
match.h Update copyright notice 2008-01-19 10:15:37 +01:00
misc.h Move oops actions from log.c up to application 2008-04-25 22:06:13 +02:00
mission.h Update copyright notice 2008-01-19 10:15:37 +01:00
nat.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
news.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
nsc.h Make xundump oops on virtual selectors 2008-05-12 11:26:41 +02:00
nuke.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
optlist.h Update known contributors comments 2008-03-14 20:25:44 +01:00
path.h Update copyright notice 2008-01-19 10:15:37 +01:00
plague.h Update copyright notice 2008-01-19 10:15:37 +01:00
plane.h Fix tracking of planes flying a sortie 2008-03-26 22:10:13 +01:00
player.h Update copyright notice 2008-01-19 10:15:37 +01:00
power.h Update copyright notice 2008-01-19 10:15:37 +01:00
product.h Update copyright notice 2008-01-19 10:15:37 +01:00
proto.h Update copyright notice 2008-01-19 10:15:37 +01:00
prototypes.h Fix crash bug in satellite maps 2008-05-13 08:36:06 +02:00
queue.h New emp_searchque() 2008-03-14 21:00:29 +01:00
retreat.h Update copyright notice 2008-01-19 10:15:37 +01:00
sect.h Doc fix 2008-03-26 22:11:23 +01:00
server.h New post_crash_dump_hook 2008-04-25 22:12:22 +02:00
service.h Update copyright notice 2008-01-19 10:15:37 +01:00
ship.h Remove option FUEL 2008-05-12 09:25:20 +02:00
tel.h Update copyright notice 2008-01-19 10:15:37 +01:00
trade.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
treaty.h Put a timestamp into struct emptypedstr 2008-03-14 20:25:43 +01:00
types.h Update copyright notice 2008-01-19 10:15:37 +01:00
unit.h Update copyright notice 2008-01-19 10:15:37 +01:00
update.h Update copyright notice 2008-01-19 10:15:37 +01:00
version.h Update copyright notice 2008-01-19 10:15:37 +01:00
xdump.h Implement human-readable dialect for xdump 2008-03-14 20:25:42 +01:00
xy.h Fix XNORM() and YNORM() 2008-05-12 18:45:11 +02:00