[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#251865: marked as done (dpkg: Format strings, etc.)



Your message dated Tue, 1 Jun 2004 21:06:47 +0200
with message-id <20040601190647.GA12178@ns.liten.cz>
and subject line Bug#251865: dpkg: Format strings, etc.
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; 31 May 2004 12:33:39 +0000
>From mcihar@suse.cz Mon May 31 05:33:39 2004
Return-path: <mcihar@suse.cz>
Received: from styx.suse.cz (bia.suse.cz) [82.208.2.94] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BUlz1-00024G-00; Mon, 31 May 2004 05:33:39 -0700
Received: from mcihar by bia.suse.cz with local (Exim 4.34)
	id 1BUlyu-0005Gz-VO; Mon, 31 May 2004 14:33:33 +0200
Content-Type: multipart/mixed; boundary="===============1438006463=="
MIME-Version: 1.0
From: =?utf-8?q?Michal_=C4=8Cihar?= <michal@cihar.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg: Format strings, etc.
X-Mailer: reportbug 2.58
Date: Mon, 31 May 2004 14:33:32 +0200
Message-Id: <E1BUlyu-0005Gz-VO@bia.suse.cz>
Sender: Michal Cihar <mcihar@suse.cz>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

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

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

Package: dpkg
Version: 1.10.21
Severity: normal


There are several places in current source that could cause problems and
gcc nicely warns about them. Attached patches fixes (most of) them.

    Michal

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.4-54.5-default
Locale: LANG=C, LC_CTYPE=cs_CZ.UTF-8

Versions of packages dpkg depends on:
ii  dselect                     1.10.21      a user tool to manage Debian packa
ii  libc6                       2.3.2.ds1-12 GNU C Library: Shared libraries an

-- no debconf information

--===============1438006463==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="dpkg-format.patch"

diff -ru dpkg-1.10.18-orig/lib/mlib.c dpkg-1.10.18/lib/mlib.c
--- dpkg-1.10.18-orig/lib/mlib.c	2003-10-25 22:05:12.000000000 +0200
+++ dpkg-1.10.18/lib/mlib.c	2004-01-26 13:23:44.000000000 +0100
@@ -196,7 +196,7 @@
       break;
     case BUFFER_WRITE_FD:
       if((ret= write(data->data.i, buf, length)) < 0 && errno != EINTR)
-	ohshite(_("failed in buffer_write(fd) (%i, ret=%li %s): %s"), data->data.i, (long)ret, desc);
+	ohshite(_("failed in buffer_write(fd) (%i, ret=%li): %s"), data->data.i, (long)ret, desc);
       break;
     case BUFFER_WRITE_NULL:
       break;
--- dpkg-1.10.18-orig/dpkg-deb/extract.c	2003-10-25 22:03:20.000000000 +0200
+++ dpkg-1.10.18/dpkg-deb/extract.c	2004-01-26 14:50:01.000000000 +0100
@@ -191,7 +191,7 @@
 
     if (admininfo >= 2)
       if (printf(_(" old debian package, version %s.\n"
-                 " size %ld bytes: control archive= %ld, main archive= %zi.\n"),
+                 " size %ld bytes: control archive= %zi, main archive= %ld.\n"),
                  versionbuf, (long)stab.st_size, ctrllennum,
                  (long) (stab.st_size - ctrllennum - strlen(ctrllenbuf) - l)) == EOF ||
           fflush(stdout)) werr("stdout");
--- dpkg-1.10.18-orig/split/info.c	2003-10-25 22:03:21.000000000 +0200
+++ dpkg-1.10.18/split/info.c	2004-01-26 14:59:00.000000000 +0100
@@ -193,9 +193,9 @@
          "        ... length:                 %lu bytes\n"
          "        ... split every:            %lu bytes\n"
          "    Part number:                    %d/%d\n"
-         "    Part length:                    %lu bytes\n"
+         "    Part length:                    %zi bytes\n"
          "    Part offset:                    %lu bytes\n"
-         "    Part file size (used portion):  %zi bytes\n\n"),
+         "    Part file size (used portion):  %lu bytes\n\n"),
          pi->filename,
          pi->fmtversion,
          pi->package,
@@ -207,7 +207,7 @@
          pi->maxpartn,
          pi->thispartlen,
          pi->thispartoffset,
-         pi->filesize);
+         (unsigned long)pi->filesize);
 }
 
 void do_info(const char *const *argv) {

--===============1438006463==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="dpkg-include.patch"

--- dpkg-1.10.18-orig/split/main.c	2003-10-25 22:03:21.000000000 +0200
+++ dpkg-1.10.18/split/main.c	2004-01-26 13:31:27.000000000 +0100
@@ -25,6 +25,8 @@
 #include <stdlib.h>
 #include <limits.h>
 #include <assert.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 
 #include <dpkg.h>
 #include <dpkg-db.h>

--===============1438006463==--

---------------------------------------
Received: (at 251865-close) by bugs.debian.org; 1 Jun 2004 19:06:01 +0000
>From michal@cihar.com Tue Jun 01 12:06:00 2004
Return-path: <michal@cihar.com>
Received: from ns.liten.cz (nova.liten.cz) [217.11.249.178] 
	by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1BVEa5-0001jS-00; Tue, 01 Jun 2004 12:05:49 -0700
Received: (qmail 30142 invoked by uid 1006); 1 Jun 2004 19:06:47 -0000
Date: Tue, 1 Jun 2004 21:06:47 +0200
From: Michal =?utf-8?B?xIxpaGHFmQ==?= <michal@cihar.com>
To: Scott James Remnant <scott@netsplit.com>
Cc: 251865-close@bugs.debian.org
Subject: Re: Bug#251865: dpkg: Format strings, etc.
Message-ID: <20040601190647.GA12178@ns.liten.cz>
References: <E1BUlyu-0005Gz-VO@bia.suse.cz> <1086116495.17455.5.camel@syndicate>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <1086116495.17455.5.camel@syndicate>
User-Agent: Mutt/1.3.28i
X-Accept-Language: cs, sk, en
Delivered-To: 251865-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

On 01.06.2004 16:01 -0300, Scott James Remnant wrote:
> On Mon, 2004-05-31 at 14:33 +0200, Michal Ä?ihar wrote:
> 
> > There are several places in current source that could cause problems and
> > gcc nicely warns about them. Attached patches fixes (most of) them.
> > 
> This is a dup of an older bug of yours, isn't it?

Ooops, you're right, I already reported this :-(. I went through patches
that should be sent to upstream and thought I didn't yet sent this one.

-- 
Regards
	Michal Ä?ihaÅ?
	http://cihar.com



Reply to: