summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control/HashCore.pm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Control/HashCore.pm')
-rw-r--r--scripts/Dpkg/Control/HashCore.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index ffb87c1d7..8a5d6e33d 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -194,6 +194,9 @@ sub parse {
$paraborder = 0;
if (m/^(\S+?)\s*:\s*(.*)$/) {
$parabody = 1;
+ if ($1 =~ m/^-/) {
+ $self->parse_error($desc, _g('field cannot start with a hyphen'));
+ }
if (exists $self->{$1}) {
unless ($$self->{allow_duplicate}) {
$self->parse_error($desc, _g('duplicate field %s found'), $1);