Quellcode durchsuchen

Merge branch 'squeeze' (through tag '1.15.8.10')

Conflicts:
	debian/changelog
Guillem Jover vor 15 Jahren
Ursprung
Commit
694b4b5ade
2 geänderte Dateien mit 12 neuen und 1 gelöschten Zeilen
  1. 7 0
      debian/changelog
  2. 5 1
      utils/update-alternatives.c

+ 7 - 0
debian/changelog

@@ -63,6 +63,13 @@ dpkg (1.16.0) UNRELEASED; urgency=low
 
  -- Guillem Jover <guillem@debian.org>  Thu, 29 Jul 2010 11:00:22 +0200
 
+dpkg (1.15.8.10) unstable; urgency=low
+
+  * Do not segfault on “update-alternatives --auto” when the link group only
+    has alternatives which are dangling symlinks. Closes: #611545
+
+ -- Guillem Jover <guillem@debian.org>  Sun, 30 Jan 2011 20:28:27 +0100
+
 dpkg (1.15.8.9) unstable; urgency=low
 
   [ Raphaël Hertzog ]

+ 5 - 1
utils/update-alternatives.c

@@ -2363,7 +2363,11 @@ main(int argc, char **argv)
 		alternative_set_status(a, ALT_ST_MANUAL);
 	} else if (strcmp(action, "auto") == 0) {
 		alternative_set_status(a, ALT_ST_AUTO);
-		new_choice = alternative_get_best(a)->master_file;
+		if (alternative_choices_count(a) == 0)
+			pr(_("There is no program which provides %s."),
+			   a->master_name);
+		else
+			new_choice = alternative_get_best(a)->master_file;
 	} else if (strcmp(action, "config") == 0) {
 		if (alternative_choices_count(a) == 0) {
 			pr(_("There is no program which provides %s."),