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

Bug#173975: dpkg: debug message causes segfault when installing



Package: dpkg
Version: 1.10.9
Severity: minor

Installing a package with --debug=7777 causes a segfault.
Here is the last part of the error message:

Setting up libglib2.0-doc (2.0.7-1) ...
D000001: deferred_configure updating conffiles
D000002: fork/exec /var/lib/dpkg/info/libglib2.0-doc.postinst (dpkg: error processing libglib2.0-doc (--install):
 subprocess post-installation script killed by signal (Segmentation fault), core dumped
Errors were encountered while processing:
 libglib2.0-0
 libglib2.0-data
 libglib2.0-dbg
 libglib2.0-dev
 libglib2.0-doc

This is a bug in do_script() in main/help.c .  It says:

  if (!c1) {
    const char **narglist;
    for (r=0; arglist[r]; r++) ;
    narglist=nfmalloc((r+1)*sizeof(char*));
    for (r=1; arglist[r-1]; r++)
      narglist[r]= arglist[r];
    scriptexec= preexecscript(scriptpath,narglist);
    narglist[0]= scriptexec;
    execv(scriptexec,narglist);
    ohshite(desc,name);
  }

preexecscript() is called before narglist[0] is set, so
narglist[0] will contain garbage.

-- System Information
Debian Release: 3.0
Kernel Version: Linux grain 2.4.18 #1 Fri Jul 19 13:47:12 JST 2002 i686 unknown

Versions of the packages dpkg depends on:
ii  dselect        1.10.9         a user tool to manage Debian packages
ii  libc6          2.2.5-6        GNU C Library: Shared libraries and Timezone



Reply to: