summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-02-11 21:25:57 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-02-11 21:25:57 +0100
commit379e22a4c0c00193b16fec3c46c4b68cdb63ee1a (patch)
treea7000e91d520d939e50c0e87243907f456643cb7
parentdd61e64da1fbae01dc82bab3635c946718cc0eb0 (diff)
remove the arbitrary MAXLEN limit for response lines (Closes: #658346)
-rw-r--r--debian/changelog3
-rw-r--r--methods/http.cc4
-rw-r--r--methods/http.h4
-rw-r--r--methods/https.h2
4 files changed, 3 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog
index 8e66fd2fd..0a366a6fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
- if a file without an extension is requested send an 'Accept: text/*'
header to avoid that the server chooses unsupported compressed files
in a content-negotation attempt (Closes: #657560)
+ - remove the arbitrary MAXLEN limit for response lines (Closes: #658346)
* apt-pkg/aptconfiguration.cc:
- chroot if needed before calling dpkg --print-foreign-architectures
- ensure that architectures are not added multiple times
@@ -44,7 +45,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
* apt-pkg/contrib/fileutl.h:
- fix compat with FileFd::OpenDescriptor() in ReadOnlyGzip mode
- -- David Kalnischkies <kalnischkies@gmail.com> Sat, 11 Feb 2012 20:59:13 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Sat, 11 Feb 2012 21:23:00 +0100
apt (0.8.16~exp12) experimental; urgency=low
diff --git a/methods/http.cc b/methods/http.cc
index 2721b1224..7ddf8e045 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -534,10 +534,6 @@ bool ServerState::HeaderLine(string Line)
if (Line.empty() == true)
return true;
- // The http server might be trying to do something evil.
- if (Line.length() >= MAXLEN)
- return _error->Error(_("Got a single header line over %u chars"),MAXLEN);
-
string::size_type Pos = Line.find(' ');
if (Pos == string::npos || Pos+1 > Line.length())
{
diff --git a/methods/http.h b/methods/http.h
index c73d4df5c..c061ad680 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -11,8 +11,6 @@
#ifndef APT_HTTP_H
#define APT_HTTP_H
-#define MAXLEN 360
-
#include <apt-pkg/strutl.h>
#include <string>
@@ -92,7 +90,7 @@ struct ServerState
unsigned int Major;
unsigned int Minor;
unsigned int Result;
- char Code[MAXLEN];
+ char Code[360];
// These are some statistics from the last parsed header lines
unsigned long long Size;
diff --git a/methods/https.h b/methods/https.h
index b7adeb880..3b57c7be6 100644
--- a/methods/https.h
+++ b/methods/https.h
@@ -11,8 +11,6 @@
#ifndef APT_HTTP_H
#define APT_HTTP_H
-#define MAXLEN 360
-
#include <iostream>
#include <curl/curl.h>