wmail: removed hard-coded buffer size.
This commit is contained in:
parent
dff64f3b71
commit
7e3cb9cbe4
|
@ -259,7 +259,7 @@ void ReadConfigFile( bool resetConfigStrings )
|
|||
const char *id, *value;
|
||||
size_t len;
|
||||
|
||||
if( fgets( buf, 1024, f ) == NULL )
|
||||
if( fgets( buf, sizeof buf, f ) == NULL )
|
||||
break;
|
||||
|
||||
// first eliminate the trailing whitespaces
|
||||
|
|
|
@ -840,7 +840,7 @@ static void ParseMBoxFile( struct stat *fileStat )
|
|||
return;
|
||||
}
|
||||
|
||||
while( fgets( buf, 1024, f ) != NULL )
|
||||
while( fgets( buf, sizeof buf, f ) != NULL )
|
||||
{
|
||||
if( strncmp( buf, "From ", 5 ) == 0 ) {
|
||||
fromFound = 1;
|
||||
|
@ -900,7 +900,7 @@ static void ParseMaildirFile( const char *fileName, unsigned long checksum,
|
|||
return;
|
||||
}
|
||||
|
||||
while( fgets( buf, 1024, f ) != NULL )
|
||||
while( fgets( buf, sizeof buf, f ) != NULL )
|
||||
{
|
||||
if( strncasecmp( buf, "from: ", 6 ) == 0 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue