X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/1c19f1a34b96b7cc21798c47ef572661f103aec9..6627bdccce46a9acdae09d37e6e1444a5f7384e1:/apt-pkg/cdrom.cc 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);