Bug#146846: apt: too long sources.list line triggers infinite loop
Package: apt
Version: 0.5.4
Severity: normal
Tags: patch
too long sources.list line triggers infinite loop: just try !
An error condition is not tested. Find trivial fix below.
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux drisse 2.2.20 #1 mer avr 3 17:56:42 CEST 2002 i586
Locale: LANG=C, LC_CTYPE=C
Versions of packages apt depends on:
ii libc6 2.2.5-6 GNU C Library: Shared libraries an
ii libstdc++2.10-glibc2.2 1:2.95.4-7 The GNU stdc++ library
*** sourcelist.cc 2002/05/13 17:43:25 1.1
--- sourcelist.cc 2002/05/13 17:49:55
***************
*** 200,205 ****
--- 200,209 ----
{
F.getline(Buffer,sizeof(Buffer));
CurLine++;
+ if (F.fail() && !F.eof())
+ return _error->Error(_("Line %u too long in source list %s (vendor id)"),
+ CurLine,File.c_str());
+
_strtabexpand(Buffer,sizeof(Buffer));
--
To UNSUBSCRIBE, email to deity-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: