[BusyBox] bug#1267: busybox dpkg segfaults
Michael Smith
msmith at cbnco.com
Thu Sep 5 12:46:03 UTC 2002
Package: busybox
Version: 0.60.3
Severity: normal
Trying to extract a .deb built with dpkg-deb fails:
# chroot /tmp/fsRXzq0a /bin/dpkg -i /tmp/statuscasters_0.00+soekris-1.deb
(Reading database ... xxxxx files and directories installed.)
Segmentation fault
I linked busybox against glibc 2.2.5.
This seemed to fix it, but I don't see why - the free() statements really
should work, since the strings were allocated with xstrdup():
--- libbb/unarchive.c 22 May 2002 14:46:12 -0000 1.1.1.1
+++ libbb/unarchive.c 5 Sep 2002 18:18:04 -0000
@@ -266,8 +266,12 @@
/* seek past the data entry */
seek_sub_file(src_stream, file_entry->size);
}
- free(file_entry->name); /* may be null, but doesn't matter */
- free(file_entry->link_name);
+ /*
+ * These should work, but cause a segfault later on. Weird.
+ * michael 5 sept 2002
+ */
+ // free(file_entry->name); /* may be null, but doesn't matter */
+ // free(file_entry->link_name);
free(file_entry);
}
return(buffer);
Mike
----------- --- -- - -
Michael Smith
Toaster Op, CBN Co. Ltd.
http://www.cbnco.com/
----------- --- -- - -
More information about the busybox
mailing list