Package: ydpdict
Version: 0.63-1
Severity: normal
Tags: patch

Calling
 ydpdict -w %s
causes SEGFAULT.

The patch below fixes this bug.

diff -ur ydpdict-0.63-org/src/ydpdict.c ydpdict-0.63-new/src/ydpdict.c
--- ydpdict-0.63-org/src/ydpdict.c      2004-05-31 11:44:37.000000000 +0200
+++ ydpdict-0.63-new/src/ydpdict.c      2005-11-12 11:16:50.000000000 +0100
@@ -822,12 +822,12 @@
        for (y = 0; y < (ysize - 4); y++) {
                wattrset(wordwin, y == menu ? A_REVERSE : A_NORMAL);
                mvwprintw(wordwin, y + 1, 0, "                    ");
-               mvwprintw(wordwin, y + 1, 1, convert_plain(strncpy(buf, 
words[pos + y], sizeof(buf) - 1), charset, 0));
+               mvwprintw(wordwin, y + 1, 1, "%s", convert_plain(strncpy(buf, 
words[pos + y], sizeof(buf) - 1), charset, 0));
        }
        
        wattrset(wordwin, exact ? A_BOLD : A_NORMAL);
        mvwprintw(wordwin, 0, 0, "[__________________]");
-       mvwprintw(wordwin, 0, 1, convert_plain(strncpy(buf, input, sizeof(buf) 
- 1), charset, 0));
+       mvwprintw(wordwin, 0, 1, "%s", convert_plain(strncpy(buf, input, 
sizeof(buf) - 1), charset, 0));
        wattrset(wordwin, A_NORMAL);

        wmove(wordwin, 0, menux + 1);

-- System Information:
Debian Release: testing/unstable
 APT prefers testing
 APT policy: (900, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.14
Locale: LANG=C, LC_CTYPE=pl_PL (charmap=ISO-8859-2)

Versions of packages ydpdict depends on:
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  libncurses5                   5.4-9      Shared libraries for terminal hand

ydpdict recommends no packages.

-- no debconf information

--
Jakub Wilk


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to