]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.cc
* merged with mainline
[apt.git] / apt-pkg / cdrom.cc
index d7ef844a2fa877cfcb3c449ff05eed94e0c69a3c..ce1beb39b8c3b24084fadc155cf2efa2573671e0 100644 (file)
@@ -422,6 +422,9 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &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);