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

dpkg-scansources: Fix perl uninitialized value usage on missing Binary field

Guillem Jover лет назад: 11
Родитель
Сommit
79076f9b61
2 измененных файлов с 3 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-scansources.pl

+ 2 - 0
debian/changelog

@@ -37,6 +37,8 @@ dpkg (1.18.0) UNRELEASED; urgency=low
   * Use TMPDIR instead of manually setting DIR on tempfile() call in
     Dpkg::Source::Package::V2.
   * Document Dpkg::IPC function signatures.
+  * Fix perl uninitialized value usage in dpkg-scansources when the Binary
+    field is missing.
 
  -- Guillem Jover <guillem@debian.org>  Tue, 09 Dec 2014 23:53:18 +0100
 

+ 1 - 1
scripts/dpkg-scansources.pl

@@ -238,7 +238,7 @@ sub process_dsc {
     $checksums->add_from_control($fields, use_files_for_md5 => 1);
 
     my $source = $fields->{Source};
-    my @binary = split /\s*,\s*/, $fields->{Binary};
+    my @binary = split /\s*,\s*/, $fields->{Binary} // '';
 
     error(g_('no binary packages specified in %s'), $file) unless (@binary);