X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/432b168ce4ec7a7c2caef44c0c8470c7197d58b3..aac2e51078714d5130861035e9b3b5d4d6b84471:/apt-pkg/tagfile.cc diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index dc1ba3f9e..79ff18de4 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -98,7 +98,8 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset) iOffset = Offset; Start = Buffer + iOffset; - if (Tag.Scan(Start,End - Start) == false) + // Start != End is a special case to not fail on empty TagFiles + if (Start != End && Tag.Scan(Start,End - Start) == false) return _error->Error(_("Unable to parse package file %s (2)"),Fd.Name().c_str()); return true;