aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-12-05 04:40:52 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-12-05 04:40:52 +0000
commitaad44fb37a3f68dc82e5387c1bf13e3b29daab24 (patch)
tree64190808eb12b990f6f23aeff5f1a8840e999edf
parent3280f9a3fc775f35472f420ede1d6c333ace87d1 (diff)
downloadbusybox-w32-aad44fb37a3f68dc82e5387c1bf13e3b29daab24.tar.gz
busybox-w32-aad44fb37a3f68dc82e5387c1bf13e3b29daab24.tar.bz2
busybox-w32-aad44fb37a3f68dc82e5387c1bf13e3b29daab24.zip
Fix some fegfaults and picket fence
-rw-r--r--archival/dpkg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 9a95eb46a..0ccca8f95 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -993,7 +993,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
993 993
994 package_num = search_package_hashtable(package_edge->name, package_edge->version, package_edge->operator); 994 package_num = search_package_hashtable(package_edge->name, package_edge->version, package_edge->operator);
995 if (package_hashtable[package_num] == NULL) { 995 if (package_hashtable[package_num] == NULL) {
996 error_msg_and_die("Dependency checking failed for package %s\nNOTE: This may be due to busybox dpkg's inability to handle the Provides field, you may avoid dependency checking using the -F option ", name_hashtable[package_edge->name]); 996 error_msg_and_die("Dependency checking failed for package %s\nNOTE: This may be due to busybox dpkg's inability to handle the Provides field, you may avoid dependency checking using the \"-F depends\" option ", name_hashtable[package_edge->name]);
997 } 997 }
998 status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]); 998 status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
999 999
@@ -1209,7 +1209,7 @@ void remove_package(const unsigned int package_num)
1209 while (remove_file_array(remove_files, exclude_files) == TRUE); 1209 while (remove_file_array(remove_files, exclude_files) == TRUE);
1210 1210
1211 /* Create a list of all /var/lib/dpkg/info/<package> files */ 1211 /* Create a list of all /var/lib/dpkg/info/<package> files */
1212 remove_files = xmalloc(11); 1212 remove_files = xmalloc(sizeof(char *) * 11);
1213 all_control_list(remove_files, package_name); 1213 all_control_list(remove_files, package_name);
1214 1214
1215 /* Create a list of files in /var/lib/dpkg/info/<package>.* to keep */ 1215 /* Create a list of files in /var/lib/dpkg/info/<package>.* to keep */
@@ -1253,7 +1253,7 @@ void purge_package(const unsigned int package_num)
1253 while (remove_file_array(remove_files, exclude_files) == TRUE); 1253 while (remove_file_array(remove_files, exclude_files) == TRUE);
1254 1254
1255 /* Create a list of all /var/lib/dpkg/info/<package> files */ 1255 /* Create a list of all /var/lib/dpkg/info/<package> files */
1256 remove_files = xmalloc(11); 1256 remove_files = xmalloc(sizeof(char *) * 11);
1257 all_control_list(remove_files, package_name); 1257 all_control_list(remove_files, package_name);
1258 remove_file_array(remove_files, exclude_files); 1258 remove_file_array(remove_files, exclude_files);
1259 1259
@@ -1288,7 +1288,7 @@ void unpack_package(deb_file_t *deb_file)
1288 } 1288 }
1289 1289
1290 /* Extract control.tar.gz to /var/lib/dpkg/info/<package>.filename */ 1290 /* Extract control.tar.gz to /var/lib/dpkg/info/<package>.filename */
1291 info_prefix = (char *) xmalloc(sizeof(package_name) + 20 + 4 + 1); 1291 info_prefix = (char *) xmalloc(sizeof(package_name) + 20 + 4 + 2);
1292 sprintf(info_prefix, "/var/lib/dpkg/info/%s.", package_name); 1292 sprintf(info_prefix, "/var/lib/dpkg/info/%s.", package_name);
1293 deb_extract(deb_file->filename, stdout, (extract_quiet | extract_control_tar_gz | extract_all_to_fs | extract_unconditional), info_prefix, NULL); 1293 deb_extract(deb_file->filename, stdout, (extract_quiet | extract_control_tar_gz | extract_all_to_fs | extract_unconditional), info_prefix, NULL);
1294 1294