Your message dated Wed, 26 Oct 2005 00:26:50 +0100
with message-id <[EMAIL PROTECTED]>
and subject line closing bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 22 Sep 2005 23:52:30 +0000
>From [EMAIL PROTECTED] Thu Sep 22 16:52:30 2005
Return-path: <[EMAIL PROTECTED]>
Received: from ltw.loris.tv [217.160.108.140] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EIard-00053h-00; Thu, 22 Sep 2005 16:52:30 -0700
Received: from localhost (ltw.loris.tv [127.0.0.1])
        by ltw.loris.tv (Postfix) with ESMTP id 042BCACB7E
        for <[EMAIL PROTECTED]>; Fri, 23 Sep 2005 01:52:27 +0200 (CEST)
Received: from ltw.loris.tv ([127.0.0.1])
        by localhost (ltw [127.0.0.1]) (amavisd-new, port 10024) with LMTP
        id 08647-02 for <[EMAIL PROTECTED]>;
        Fri, 23 Sep 2005 01:52:13 +0200 (CEST)
Received: from drcomp.erfurt.thur.de (drcomp-eth1.loris.tv 
[IPv6:2001:6f8:1318:3::2])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (No client certificate requested)
        by ltw.loris.tv (Postfix) with ESMTP id 3AE66ACB7D
        for <[EMAIL PROTECTED]>; Fri, 23 Sep 2005 01:52:10 +0200 (CEST)
Received: from drcomp.erfurt.thur.de ([EMAIL PROTECTED] [127.0.0.1])
        by drcomp.erfurt.thur.de (8.13.4/8.13.2) with ESMTP id j8MNqn5m030687;
        Fri, 23 Sep 2005 01:52:49 +0200
Received: (from [EMAIL PROTECTED])
        by drcomp.erfurt.thur.de (8.13.4/8.13.1/Submit) id j8MNqmsq030686;
        Fri, 23 Sep 2005 01:52:48 +0200
Message-Id: <[EMAIL PROTECTED]>
Content-Type: multipart/mixed; boundary="===============2125481096=="
MIME-Version: 1.0
From: Adrian Knoth <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: lpe crashes with sig11 on write attempts on amd64 (x86_64)
X-Mailer: reportbug 3.15
Date: Fri, 23 Sep 2005 01:52:48 +0200
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ltw.loris.tv
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

This is a multi-part MIME message sent by reportbug.

--===============2125481096==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: lpe
Version: 1.2.6.12
Severity: important
Tags: patch


lpe crashes  with sig11 on amd64 when trying to save a buffer to file,
thus rendering it useless on x86-64-systems.

Analyzing the coredump with gdb shows that save_buffer from buffer.c
calls sprintf with the two functions basename and dirname.

At least one of them is erroneous, however, I do not see why one should
concatenate the output of dirname($filename) with basename($filename)
(resulting in $filename itself), so I replaced these two function-
calls with a simple reference to $file (this is buf->fname).

The attached patch fixes the sig11 on amd64.

Note: I'm using my normal i386-system for reporting this bug as the
      amd64-system is unable to send mail.


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (50, 'unstable')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages lpe depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libncurses5                 5.4-9        Shared libraries for terminal hand
ii  libslang2                   2.0.4-2      The S-Lang programming library - r

lpe recommends no packages.

-- no debconf information

--===============2125481096==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="lpe-amd64.patch"

diff -u -r lpe-1.2.6.11/src/buffer.c lpe-new/src/buffer.c
--- lpe-1.2.6.11/src/buffer.c   2004-07-24 01:00:26.000000000 +0200
+++ lpe-new/src/buffer.c        2005-09-23 01:42:06.000000000 +0200
@@ -550,7 +550,9 @@
      */
     strcpy(dir, buf->fname);
     strcpy(file,buf->fname);
-    sprintf(bakname,"%s/.%s.lpe",dirname(dir),basename(file));
+    if ((buf->fname) != NULL) {
+       snprintf(bakname, sizeof(bakname), "%s.lpe", file);
+    }
     if(copy(buf->fname,bakname) != 0)
         copied = 0;
     fp = fopen (buf->fname, "w");

--===============2125481096==--

---------------------------------------
Received: (at 329719-done) by bugs.debian.org; 26 Oct 2005 00:26:44 +0000
>From [EMAIL PROTECTED] Tue Oct 25 17:26:44 2005
Return-path: <[EMAIL PROTECTED]>
Received: from polaris.galacticasoftware.com [206.45.95.222] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EUZ7s-0004cY-00; Tue, 25 Oct 2005 17:26:44 -0700
Received: from [2001:470:1f00:907:adf8:2177:5d15:a501] 
(helo=[IPv6:2001:470:1f00:907:adf8:2177:5d15:a501])
        by polaris.galacticasoftware.com with esmtp (Exim 4.50)
        id 1EUZ7r-0003P8-4h
        for [EMAIL PROTECTED]; Tue, 25 Oct 2005 19:26:43 -0500
Message-ID: <[EMAIL PROTECTED]>
Date: Wed, 26 Oct 2005 00:26:50 +0100
From: Adam Majer <[EMAIL PROTECTED]>
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: [EMAIL PROTECTED]
Subject: closing bug
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
        version=2.60-bugs.debian.org_2005_01_02

Version: 1.2.6.13

Fixed. Accidently closed the bug in changelog against libc6 for this 
issue. :)

- Adam



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

Reply via email to