diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:59:22 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:59:22 +0000 |
commit | ba1045b4159d4e8dcadd3a137b1d3eea47416df8 (patch) | |
tree | 360285d0daca8e92d2555b45843d3108ae4effbd /apt-pkg/sourcelist.cc | |
parent | bbe8a3f57c602f27d7f41f927458ee72fc7145b0 (diff) |
Don't die if lines in sources.list are too long. Closes...
Author: jgg
Date: 2002-07-08 04:18:07 GMT
Don't die if lines in sources.list are too long. Closes: #146846
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r-- | apt-pkg/sourcelist.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 1173098d2..12db63079 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sourcelist.cc,v 1.23 2002/07/01 21:41:11 jgg Exp $ +// $Id: sourcelist.cc,v 1.24 2002/07/08 04:18:07 jgg Exp $ /* ###################################################################### List of Sources @@ -245,7 +245,10 @@ bool pkgSourceList::Read(string File) F.getline(Buffer,sizeof(Buffer)); CurLine++; _strtabexpand(Buffer,sizeof(Buffer)); - + if (F.fail() && !F.eof()) + return _error->Error(_("Line %u too long in source list %s."), + CurLine,File.c_str()); + char *I; for (I = Buffer; *I != 0 && *I != '#'; I++); |