summaryrefslogtreecommitdiff
path: root/ftparchive/sources.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-01-09 01:03:31 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-01-10 13:31:14 +0100
commit31be38d205406d4c756684e20b93d62c4701e091 (patch)
tree2a909c180563e5e662a7578ed162b0d6401d9a96 /ftparchive/sources.h
parentd13f2ef5dd2cf41d7abd7f309a9e8965a77d2a63 (diff)
128 KiB DSC files ought to be enough for everyone
Your mileage may vary, but don't worry: There is more than one way to do it, but our one size fits all is not a bigger hammer, but an entire roundhouse kick! So brace yourself for the tl;dr: The limit is gone.* Beware: This fixes also the problem that a double newline is unconditionally added 'later' which is an overcommitment in case the dsc filesize is limit-2 <= x <= limit. * limited to numbers fitting into an unsigned long long. Closes: 774893
Diffstat (limited to 'ftparchive/sources.h')
-rw-r--r--ftparchive/sources.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/ftparchive/sources.h b/ftparchive/sources.h
index 91e0b1376..a125ec6a4 100644
--- a/ftparchive/sources.h
+++ b/ftparchive/sources.h
@@ -3,29 +3,21 @@
#include <apt-pkg/tagfile.h>
-class DscExtract
+#include <string>
+
+class DscExtract
{
public:
- //FIXME: do we really need to enforce a maximum size of the dsc file?
- static const int maxSize = 128*1024;
-
- char *Data;
+ std::string Data;
pkgTagSection Section;
- unsigned long Length;
+ unsigned long long Length;
bool IsClearSigned;
- bool TakeDsc(const void *Data, unsigned long Size);
+ bool TakeDsc(const void *Data, unsigned long long Size);
bool Read(std::string FileName);
-
- DscExtract() : Data(0), Length(0) {
- Data = new char[maxSize];
- };
- ~DscExtract() {
- if(Data != NULL) {
- delete [] Data;
- Data = NULL;
- }
- };
+
+ DscExtract() : Length(0), IsClearSigned(false) {};
+ ~DscExtract() {};
};