Author: mdz
Date: 2004-04-30 04:00:15 GMT
* Increase length of line buffer in ReadConfigFile to 1024 chars;
detect if a line is longer than that and error out
(Closes: #244835)
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: configuration.cc,v 1.27 2003/07/26 00:27:36 mdz Exp $
+// $Id: configuration.cc,v 1.28 2004/04/30 04:00:15 mdz Exp $
/* ######################################################################
Configuration Class
/* ######################################################################
Configuration Class
if (!F != 0)
return _error->Errno("ifstream::ifstream",_("Opening configuration file %s"),FName.c_str());
if (!F != 0)
return _error->Errno("ifstream::ifstream",_("Opening configuration file %s"),FName.c_str());
string LineBuffer;
string Stack[100];
unsigned int StackPos = 0;
string LineBuffer;
string Stack[100];
unsigned int StackPos = 0;
{
F.getline(Buffer,sizeof(Buffer));
CurLine++;
{
F.getline(Buffer,sizeof(Buffer));
CurLine++;
+ // This should be made to work instead, but this is better than looping
+ if (F.fail() && !F.eof())
+ return _error->Error(_("Line %d too long (max %d)"), CurLine, sizeof(Buffer));
+
_strtabexpand(Buffer,sizeof(Buffer));
_strstrip(Buffer);
_strtabexpand(Buffer,sizeof(Buffer));
_strstrip(Buffer);
(Closes: #246550)
* Support DEB_BUILD_OPTIONS=noopt in debian/rules
(Closes: #244293)
(Closes: #246550)
* Support DEB_BUILD_OPTIONS=noopt in debian/rules
(Closes: #244293)
+ * Increase length of line buffer in ReadConfigFile to 1024 chars;
+ detect if a line is longer than that and error out
+ (Closes: #244835)
- -- Matt Zimmerman <mdz@debian.org> Thu, 29 Apr 2004 20:46:35 -0700
+ -- Matt Zimmerman <mdz@debian.org> Thu, 29 Apr 2004 21:00:02 -0700
apt (0.5.24) unstable; urgency=low
apt (0.5.24) unstable; urgency=low