Просмотр исходного кода

u-a: Fix a segfault when adding a new slave link to a link group

Return the correct slave link from alternative_add_slave(), instead of
the typoed sl variable.

Regression introduced in commit 9bbdca83fa1a8c817a2f8d02db493f173435a5af.

Closes: #731710

Reported-by: Julian Andres Klode <jak@debian.org>
Tested-by: Julian Andres Klode <jak@debian.org>
Tested-by: Roland Stigge <stigge@debian.org>
Guillem Jover лет назад: 12
Родитель
Сommit
4be73ca0f4
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      debian/changelog
  2. 1 1
      utils/update-alternatives.c

+ 3 - 0
debian/changelog

@@ -6,6 +6,9 @@ dpkg (1.17.5) UNRELEASED; urgency=low
     progress reporting output (i.e. dpkg-query). This was causing out-of-order
     progress reporting output (i.e. dpkg-query). This was causing out-of-order
     error and debug messages in relation to normal progress reporting, which
     error and debug messages in relation to normal progress reporting, which
     could be very confusing. Regression introduced in dpkg 1.17.2.
     could be very confusing. Regression introduced in dpkg 1.17.2.
+  * Fix segfault in update-alternatives when adding or renaming slaves for
+    an existing alternative. Regression introduced in dpkg 1.17.2.
+    Closes: #731710
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * German (Sven Joachim).
   * German (Sven Joachim).

+ 1 - 1
utils/update-alternatives.c

@@ -980,7 +980,7 @@ alternative_add_slave(struct alternative *a, char *slave_name,
 	else
 	else
 		a->slaves = new;
 		a->slaves = new;
 
 
-	return sl;
+	return new;
 }
 }
 
 
 static void
 static void