[Deborphan-devel] Bug#741282: free(): invalid pointer: with " \n" line in keep file

Kevin Mitchell kevmitch at math.sfu.ca
Mon Mar 10 18:32:58 UTC 2014


Package: deborphan
Version: 1.7.28.8
Severity: normal

When running deborphan with no arguments
$ deborphan
*** Error in `deborphan': free(): invalid pointer: 0x0000000000ab9401 ***

I traced the problem down to the line " \n" in my
/var/lib/deborphan/keep file. I'm not sure how such a line found its
way in there, but seeing as how (to my knowledge) this file has only been edited by
deborphan itself, I think this case should be handled more gracefully.

The offending free is at keep.c:107. I think the problem is that
100:line2 += strspn(line2, " \t");
is shifting the pointer forward by one character which is consequently not freeable.

Kevin

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (600, 'unstable'), (500, 'testing'), (300, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14.0-rc5.09+ (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages deborphan depends on:
ii  libc6  2.18-4

Versions of packages deborphan recommends:
ii  apt           0.9.15.5+b1
ii  dialog        1.2-20140219-1
ii  gettext-base  0.18.3.2-1

deborphan suggests no packages.

-- no debconf information



More information about the Deborphan-devel mailing list