瀏覽代碼

Dpkg::BuildOptions: deal properly with undefined values in merge()

Raphaël Hertzog 16 年之前
父節點
當前提交
4c933be6a5
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scripts/Dpkg/BuildOptions.pm

+ 1 - 0
scripts/Dpkg/BuildOptions.pm

@@ -82,6 +82,7 @@ values like "nocheck parallel=2".
 
 sub merge {
     my ($self, $content, $source) = @_;
+    return 0 unless defined $content;
     my $count = 0;
     foreach (split(/\s+/, $content)) {
 	unless (/^([a-z][a-z0-9_-]*)(?:=(\S*))?$/) {