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

dpkg-shlibdeps: Do not use undefined values returned from deps_parse()

When there's a bogus Build-Depends field on the source control file,
and the binary package being built is using a shared library package
that has a Build-Depends-Package field in the symbols file, the
dpkg-shlibdeps code will try to use an undefined value as deps_parse()
failed but the error was not handled before. Instead, error out early.

Closes: #640676

Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org>
Signed-off-by: Guillem Jover <guillem@debian.org>
Guillem Jover лет назад: 14
Родитель
Сommit
a1c7a7bb9b
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      debian/changelog
  2. 1 0
      scripts/dpkg-shlibdeps.pl

+ 2 - 0
debian/changelog

@@ -44,6 +44,8 @@ dpkg (1.16.5) UNRELEASED; urgency=low
     Thanks to Thibaut Girka <thib@sitedethib.com>.
   * Accept “:native” arch-qualified Build-Dependencies. Closes: #558095
     Thanks to Thibaut Girka <thib@sitedethib.com>.
+  * Do not use undefined values returned form deps_parse() in dpkg-shlibdeps.
+    Closes: #640676
 
   [ Updated dpkg translations ]
   * Swedish (Peter Krefting).

+ 1 - 0
scripts/dpkg-shlibdeps.pl

@@ -142,6 +142,7 @@ my $fields = $control->get_source();
 my $build_depends = defined($fields->{"Build-Depends"}) ?
 		    $fields->{"Build-Depends"} : "";
 my $build_deps = deps_parse($build_depends, build_dep => 1, reduce_arch => 1);
+error(_("error occurred while parsing %s"), "Build-Depends") unless defined $build_deps;
 
 my %dependencies;
 my %shlibs;