Преглед изворни кода

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

Guillem Jover пре 11 година
родитељ
комит
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
   * Use TMPDIR instead of manually setting DIR on tempfile() call in
     Dpkg::Source::Package::V2.
     Dpkg::Source::Package::V2.
   * Document Dpkg::IPC function signatures.
   * 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
  -- 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);
     $checksums->add_from_control($fields, use_files_for_md5 => 1);
 
 
     my $source = $fields->{Source};
     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);
     error(g_('no binary packages specified in %s'), $file) unless (@binary);