summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-12-30 12:50:56 -0800
committerSam Bingner <sam@bingner.com>2019-08-17 12:41:40 -1000
commit596ddf0c783d440e4817d928c0755d50262e0900 (patch)
tree2a705086d97bbfde1cca9f82a710f88d1a1158f5 /apt-pkg/tagfile.cc
parent4ebfd3145b3b6e9b12c9aef46ea1b11bfee8bfb1 (diff)
Fix field-without-values appearing at end of file.
Diffstat (limited to 'apt-pkg/tagfile.cc')
-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 34cd721c6..250f7ac17 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -277,10 +277,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;
}