Package: aptitude / 0.8.11-7

fix-crash-907436.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Fix crashes when Label of a repository is empty
Author: Manuel A. Fernandez Montecelo <manuel.montezelo@gmail.com>
Bug-Debian: https://bugs.debian.org/907436
Forwarded: no

--- a/src/generic/apt/apt.cc
+++ b/src/generic/apt/apt.cc
@@ -1420,7 +1420,15 @@
 
   if (ver.Downloadable())
     {
-      return ver.FileList().File().Label();
+      if (ver.FileList().File() &&
+	  ver.FileList().File().Label())
+	{
+	  return ver.FileList().File().Label();
+	}
+      else
+	{
+	  return string{};
+	}
     }
   else
     {