diff options
Diffstat (limited to 'apt-pkg/cdrom.cc')
-rw-r--r-- | apt-pkg/cdrom.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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<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); |