Bug#826333: Saving new map not arch-independent

Bas Wijnen wijnen at debian.org
Sat Jun 4 16:07:13 UTC 2016


Package: freedink
Version: 108.4-1
Severity: important

See http://www.dinknetwork.com/forum.cgi?MID=195069#195357 :

> In src/freedinkedit.c, lines 595 and 596, the code uses sizeof(struct
> small_map), but that struct is not defined in a way to keep its size the same
> on all architectures.
> 
> Either that should be done by changing the "int"s into "int32_t"s in its
> definition (and adding "__attribute__((packed))"; it may work without it, but
> is appropriate for this situation), or (easier but worse for maintenance) it
> should be replaced by the number, as in save_map in src/dinkvar.c: 31280
> (line 1044, which includes a comment warning about this exact problem; see
> what I mean by "worse for maintenance"?)

When using the proper solution, that line in save_map should also be changed to
use sizeof(struct small_map).

For context, the problem is described earlier on that page:

http://www.dinknetwork.com/forum.cgi?MID=195069#195091 :

> When I add one square, the map file grows to 437.9 KB. Then at 10 screens it
> becomes 750.7 KB, then 1.3 MB, then 2.1MB, then 3.4, 5.6, 9.3, 15.3, 25.2,
> 41.6, 68.5, 112.8, etc....

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: mipsel, armhf, i386

Kernel: Linux 4.4.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages freedink depends on:
ii  freedink-dfarc   3.12-1+b1
ii  freedink-engine  108.4-1

freedink recommends no packages.

freedink suggests no packages.

-- no debconf information



More information about the Pkg-games-devel mailing list