X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/432b168ce4ec7a7c2caef44c0c8470c7197d58b3..b1a8717ae8e07101cfae03b978d57b793884a3d9:/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;