wmail: removed hard-coded buffer size.

This commit is contained in:
Jeremy Sowden 2019-06-12 21:37:16 +01:00 committed by Carlos R. Mafra
parent dff64f3b71
commit 7e3cb9cbe4
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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 )
{