X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1d1b09d580e2de36f719cd9e1f6004b265b41cb9..5e972bffae68a75aafc9f9b639e82e252fde3b8b:/apt-pkg/cdrom.cc?ds=sidebyside diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index d7ef844a2..ce1beb39b 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -422,6 +422,9 @@ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) { F.getline(Buffer,sizeof(Buffer)); CurLine++; + if (F.fail() && !F.eof()) + return _error->Error(_("Line %u too long in source list %s."), + CurLine,File.c_str()); _strtabexpand(Buffer,sizeof(Buffer)); _strstrip(Buffer);