Commit d55f56ec authored by Felix Lechner's avatar Felix Lechner Committed by Chris Lamb

Fix use of uninitialized value in checks/

When running Lintian from master on a changes files that is not in the
current directory, Lintian emits the following error:

  Use of uninitialized value $1 in concatenation (.) or string at /lcl/lechner/lintian/git/checks/ line 429

It can be reproduced on amd64 with a current master of Lintian by
running in the Lintian root (here called 'git'):

  cd ..
  cd mdadm-4.1
  ../git/frontend/lintian ../mdadm_4.1-2_amd64.changes

This commit checks for null before using the value.

Gbp-Dch: ignore
Signed-off-by: Chris Lamb's avatarChris Lamb <>
parent 2045ea8f
......@@ -426,8 +426,11 @@ sub run {
# If we have a /usr/sbin/foo, check for references to
# /usr/bin/foo
push(@bin_binaries, "/$1bin/$2")
if $file->is_file and $fname =~ m,^(usr/)?sbin/(.+),;
if ($file->is_file) {
$fname =~ m,^(usr/)?sbin/(.+),;
push(@bin_binaries, "/$1bin/$2")
if length $1 && length $2;
$arch_dep_files = 1
if not $file->is_dir
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment