aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-03-31 16:46:44 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-03-31 16:53:40 +0300
commit566ac9e3dfb5d05ab83f81f81adf3810a8f69ebe (patch)
tree9e5f027f8d2ae34fa16b090a810bc47fcdafe094 /bpkg/manifest.cxx
parent1abaeaf0ab3e732c9fb0b83510575e7a90bd1c68 (diff)
Fix signature_manifest ctor to check for end of stream
Diffstat (limited to 'bpkg/manifest.cxx')
-rw-r--r--bpkg/manifest.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx
index 54627e7..107c2fe 100644
--- a/bpkg/manifest.cxx
+++ b/bpkg/manifest.cxx
@@ -705,7 +705,7 @@ namespace bpkg
// used for version constrains rather than actual releases.
//
if (version.release && version.release->empty ())
- bad_name ("invalid package version release");
+ bad_value ("invalid package version release");
}
else if (n == "summary")
{
@@ -1242,8 +1242,6 @@ namespace bpkg
s.next ("package-email",
add_comment (*package_email, package_email->comment));
-
-
for (const auto& d: dependencies)
s.next ("depends",
(d.conditional
@@ -2155,6 +2153,13 @@ namespace bpkg
bad_value ("no sha256sum specified");
else if (signature.empty ())
bad_value ("no signature specified");
+
+ // Make sure this is the end.
+ //
+ nv = p.next ();
+ if (!nv.empty ())
+ throw parsing (p.name (), nv.name_line, nv.name_column,
+ "single signature manifest expected");
}
void signature_manifest::