Bug#213038: dpkg: segfault if destination partition is full
Package: dpkg
Version: 1.10.15
Severity: normal
Tags: patch
Followup-For: Bug #213038
I don't know if this is related to the issue reported by Gunter Ohrner,
but I also get segfault when running out of disk space. Found the cause
by running dpkg under valgrind, seems to be a printf-like format string
with four %'s, but only three arguments. Patch follows:
--- lib/mlib.c.orig 2003-09-28 02:25:31.000000000 +0200
+++ lib/mlib.c 2003-09-28 02:25:50.000000000 +0200
@@ -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=%zi %s): %s"), data->data.i, ret, desc);
+ ohshite(_("failed in buffer_write(fd) (%i, ret=%zi): %s"), data->data.i, ret, desc);
break;
case BUFFER_WRITE_NULL:
break;
After fix, I got this message instead of segfault, which seems right.
failed in buffer_write(fd) (8, ret=-1): backend dpkg-deb during `./usr/share/locale/cs/LC_MESSAGES/libc.mo': No space left on device
Keep cool / Christian
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux saturn 2.4.20 #15 Sat May 3 05:08:04 CEST 2003 i586
Locale: LANG=C, LC_CTYPE=sv_SE
Versions of packages dpkg depends on:
ii dselect 1.10.15 a user tool to manage Debian packa
ii libc6 2.3.2-8 GNU C Library: Shared libraries an
-- no debconf information
Reply to: