Package: toppler
Version: 1.1.2a-3
Severity: normal
Tags: patch
If I create a tower in level editor and start testing(playing) it by pressing
"p" in level editor, and play till the
exit (goal), program crashes. It happens because NULL pointer is used.
I changed level.cc, so that "mission" ptr is checked if it is not 0 before
usage.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages toppler depends on:
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii libgcc1 1:4.1.1-21 GCC support library
ii libsdl-mixer1.2 1.2.6-1.1+b2 mixer library for Simple DirectMed
ii libsdl1.2debian 1.2.11-8 Simple DirectMedia Layer
ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3
ii zlib1g 1:1.2.3-13 compression library - runtime
toppler recommends no packages.
-- no debconf information
--- toppler-1.1.2a/level.cc 2006-01-18 18:46:07.000000000 +0100
+++ ../level.cc 2008-02-04 01:27:53.000000000 +0100
@@ -385,6 +385,10 @@
}
Uint8 lev_towercount(void) {
+ if(NULL == mission)
+ {
+ return 0;
+ }
return mission[mission[0] + 2];
}