summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-01-13 14:51:28 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-01-13 14:51:28 +0100
commitbe4eec613e34a43f34eb9a9b227b69a58fe66ec8 (patch)
treeffc2b4d427c95558bbfe8e0202724004751c5ad0 /methods
parentf45fd56b58a71f2827eb8b4f96333782d84b7b63 (diff)
parent72f6c6f8d9b1a92c7795ffcfbdc3b8858eb79a70 (diff)
merge with lp:~mvo/apt/debian-sid to get 0.7.25.1 and my changes back
Diffstat (limited to 'methods')
-rw-r--r--methods/gpgv.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index e3e849827..c58e6cc45 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -99,7 +99,8 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
{
Args[i++] = "--keyring";
Args[i++] = K->c_str();
- if(i >= 395) {
+ // check overflow (minus a bit of extra space at the end)
+ if(i >= sizeof(Args)/sizeof(char*)-5) {
std::clog << _("E: Too many keyrings should be passed to gpgv. Exiting.") << std::endl;
exit(111);
}
@@ -115,7 +116,8 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
if (Opts->Value.empty() == true)
continue;
Args[i++] = Opts->Value.c_str();
- if(i >= 395) {
+ // check overflow (minus a bit of extra space at the end)
+ if(i >= sizeof(Args)/sizeof(char*)-5) {
std::clog << _("E: Argument list from Acquire::gpgv::Options too long. Exiting.") << std::endl;
exit(111);
}