Debian Bug report logs - #21330
dpkg: link and use problems on non-snprintf platform

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: <joost@rulcmc.leidenuniv.nl>

Date: Sat, 18 Apr 1998 06:03:01 UTC

Severity: fixed

Found in version 1.4.0.21

Done: Josip Rodin <joy@cibalia.gkvk.hr>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Klee Dienes and Ian Jackson <dpkg-maint@chiark.greenend.org.uk>:
Bug#21330; Package dpkg. (full text, mbox, link).


Acknowledgement sent to <joost@rulcmc.leidenuniv.nl>:
New bug report received and forwarded. Copy sent to Klee Dienes and Ian Jackson <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: <joost@rulcmc.leidenuniv.nl>
To: submit@bugs.debian.org
Subject: dpkg: link and use problems on non-snprintf platform
Date: Sat, 18 Apr 1998 08:01:06 +0200 (CEST)
Package: dpkg
Version: 1.4.0.21

In order to get dpkg to install it's first package on a non-linux
alpha, I had to apply the following two patches. Could they be
added to the next release? Thanks.



Ah, I'm the first to actually use dpkg on a system that doesn't have
a snprintf. Cool! So I was the one who found this off-by-one error:

--- ../dpkg-old/lib/compat.c    Sat Mar  8 20:40:49 1997
+++ lib/compat.c        Thu Apr 16 14:42:18 1998
@@ -58,8 +58,8 @@
   } else {
     retval= want;
   }
-  nr= fread(buf,1,want-1,file);
-  if (nr != want-1) ohshite(_("read error in vsnprintf truncated"));
+  nr= fread(buf,1,want,file);
+  if (nr != want) ohshite(_("read error in vsnprintf truncated"));
   buf[want]= 0;
 
   return retval;



And again, I don't have snprintf here. So this doesn't link unless
I correct this:

--- ../dpkg-old/lib/parsehelp.c Wed Apr 30 01:06:35 1997
+++ lib/parsehelp.c     Thu Apr  9 11:13:26 1998
@@ -121,7 +121,7 @@
     while (isspace(*p)) p++;
     *ep= p; return 0;
   }
-  snprintf(buf, sizeof(buf),
+  vsnprintf(buf, sizeof(buf),
           _("character `%c' not allowed - only letters, digits and %s allowed"),
           c, alsoallowed);
   return buf;


-- System Information
$ uname -a
OSF1 xxx.nl V3.2 62 alpha

Versions of the packages dpkg depends on:
(not applicable)


Severity set to `fixed'. Request was from Josip Rodin <joy@cibalia.gkvk.hr> to control@bugs.debian.org. (full text, mbox, link).


Reply sent to Josip Rodin <joy@cibalia.gkvk.hr>:
You have taken responsibility. (full text, mbox, link).


Notification sent to <joost@rulcmc.leidenuniv.nl>:
Bug acknowledged by developer. (full text, mbox, link).


Message #12 received at 21330-done@bugs.debian.org (full text, mbox, reply):

From: Josip Rodin <joy@cibalia.gkvk.hr>
To: 1399-done@bugs.debian.org, 13187-done@bugs.debian.org, 17877-done@bugs.debian.org, 17897-done@bugs.debian.org, 21330-done@bugs.debian.org, 46747-done@bugs.debian.org, 52919-done@bugs.debian.org
Subject: these bugs have all been fixed in the latest dpkg (1.6.9)
Date: Mon, 6 Mar 2000 18:25:13 +0100
Hi people,

These bugs you have reported have all been fixed in the latest dpkg
package, version 1.6.9.

     * #1399: dselect error handling not consistent
     * #6007: dselect pbm.

Dselect now displays a message saying that the database is inaccessible or
that it is locked, asks for <enter>, and returns to the main menu
afterwards.

     * #13187: --quiet|--verbose on update-alternatives don't do
       anything.

Verbosity ($verbosemode) has been implemented in update-alternatives.

     * #17877: dpkg: 'help' gets annoying after a while

There is a `--expert' command line option for dselect that turns off
automatic help messages.

     * #17897: dpkg: dselect core dumped
     * #18028: scanning package dir breaks install
     * #18484: dpkg: "internal error" in dselect
     * #18540: dpkg: unhelpful error message (invalid control file)
     * #22649: dselect crashes

This was an old bug in the "disk" access method, and it seems to have been
fixed long ago.

     * #21330: dpkg: link and use problems on non-snprintf platform

The snprintf usage in that file was fixed.

     * #46747: dpkg: [hurd] start-stop-daemon

This Hurd patch was applied.

     * #52919: dpkg: Dselect main menu title line incorrect (has %s,
       printf problem?).

This %s was fixed.

(Wichert, dpkg maintainer, has told me I may close these bug reports instead
of him)

Thanks for reporting.

-- 
enJoy -*/\*- don't even try to pronounce my first name


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat May 11 02:55:13 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.