Package: aptitude Version: 0.4.11.10-1lenny1.1ubuntu1 Severity: normal Tags: patch User: [email protected] Usertags: origin-ubuntu jaunty ubuntu-patch
Due to an incorrect size argument to swprintf in src/mine/cmine.cc, aptitude crashes when starting minesweeper with a fortify abort if compiled with -D_FORTIFY_SOURCE, as it is on Ubuntu.
I've attached a patch that corrects the problem by passing the correct buffer size to swprintf.
-- Package-specific info:
aptitude 0.4.11.10 compiled at Nov 17 2008 10:48:38
Compiler: g++ 4.3.3 20081112 (prerelease)
Compiled against:
apt version 4.6.0
NCurses version 5.7
libsigc++ version: 2.0.18
Ept support enabled.
Current library versions:
NCurses version: ncurses 5.7.20081220
cwidget version: 0.5.12
Apt version: 4.6.0
linux-vdso.so.1 => (0x00007fffd25fe000)
libapt-pkg-libc6.8-6.so.4.6 => /usr/lib/libapt-pkg-libc6.8-6.so.4.6
(0x00007fc9c9fda000)
libncursesw.so.5 => /lib/libncursesw.so.5 (0x00007fc9c9d91000)
libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0x00007fc9c9b8b000)
libcwidget.so.3 => /usr/lib/libcwidget.so.3 (0x00007fc9c98bc000)
libept.so.0 => /usr/lib/libept.so.0 (0x00007fc9c9646000)
libxapian.so.15 => /usr/lib/libxapian.so.15 (0x00007fc9c92e3000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fc9c90cb000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fc9c8eaf000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fc9c8ba2000)
libm.so.6 => /lib/libm.so.6 (0x00007fc9c891d000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fc9c8705000)
libc.so.6 => /lib/libc.so.6 (0x00007fc9c8393000)
libutil.so.1 => /lib/libutil.so.1 (0x00007fc9c8190000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fc9c7f8c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc9ca299000)
Terminal: xterm-color
$DISPLAY not set.
`which aptitude`: /usr/bin/aptitude
aptitude version information:
aptitude linkage:
-- System Information:
Debian Release: 5.0
APT prefers jaunty-updates
APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500,
'jaunty-backports'), (500, 'jaunty')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.28-4-server (SMP w/2 CPU cores)
Locale: LANG=en_HK.UTF-8, LC_CTYPE=en_HK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages aptitude depends on:
ii apt [libapt-pkg 0.7.19ubuntu1 Advanced front-end for dpkg
ii libc6 2.9-0ubuntu7 GNU C Library: Shared libraries
ii libcwidget3 0.5.12-3ubuntu1 high-level terminal interface libr
ii libept0 0.5.26 High-level library for managing De
ii libgcc1 1:4.3.2-2ubuntu10 GCC support library
ii libncursesw5 5.7+20081220-1ubuntu1 shared libraries for terminal hand
ii libsigc++-2.0-0 2.0.18-2 type-safe Signal Framework for C++
ii libstdc++6 4.3.2-2ubuntu10 The GNU Standard C++ Library v3
ii libxapian15 1.0.7-4 Search engine library
ii zlib1g 1:1.2.3.3.dfsg-12ubuntu1 compression library - runtime
Versions of packages aptitude recommends:
ii libparse-debianchangelog-perl 1.1.1-2 parse Debian changelogs and output
Versions of packages aptitude suggests:
ii aptitude-doc- 0.4.11.10-1lenny1.1ubuntu1 English manual for aptitude, a ter
pn debtags <none> (no description available)
ii tasksel 2.73ubuntu13 Tool for selecting tasks for insta
-- no debconf information
Index: aptitude-0.4.11.10/src/mine/cmine.cc
===================================================================
--- aptitude-0.4.11.10.orig/src/mine/cmine.cc
+++ aptitude-0.4.11.10/src/mine/cmine.cc
@@ -116,7 +116,7 @@
if(board->get_state()==mine_board::playing)
swprintf(buf,
- sizeof(buf),
+ 200,
W_("%i/%i mines %d %s").c_str(),
board->get_nummines()-board->get_numflags(),
board->get_nummines(),
@@ -124,7 +124,7 @@
board->get_duration()==1?_("second"):_("seconds"));
else
swprintf(buf,
- sizeof(buf),
+ 200,
W_(" %s in %d %s").c_str(),
board->get_state()==mine_board::won?_("Won"):_("Lost"),
(int) board->get_duration(),
signature.asc
Description: Digital signature

