summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-12-30 12:50:56 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2016-12-30 12:50:56 -0800
commit4f1e54bea150c1db7b391d115ce19192463430d4 (patch)
treec630a8f62c6a0c0e52bf06499ae65e09d7da2ddc /apt-pkg
parent9fe917c7ea24a626c97fcd9cda39743440a4cbfc (diff)
Fix field-without-values appearing at end of file.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/tagfile.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index 76e18bf4c..c5c668fd3 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -276,10 +276,8 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength,bool const Su
// find the beginning of the value
Stop = Colon + 1;
for (; Stop < End && isspace_ascii(*Stop) != 0; ++Stop)
- if (*Stop == '\n' && Stop[1] != ' ')
+ if (*Stop == '\n' && (Stop+1 == End || Stop[1] != ' '))
break;
- if (Stop >= End)
- return false;
lastTagData.StartValue = Stop - Section;
}