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;
|
const char *id, *value;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
if( fgets( buf, 1024, f ) == NULL )
|
if( fgets( buf, sizeof buf, f ) == NULL )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// first eliminate the trailing whitespaces
|
// first eliminate the trailing whitespaces
|
||||||
|
|
|
@ -840,7 +840,7 @@ static void ParseMBoxFile( struct stat *fileStat )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( fgets( buf, 1024, f ) != NULL )
|
while( fgets( buf, sizeof buf, f ) != NULL )
|
||||||
{
|
{
|
||||||
if( strncmp( buf, "From ", 5 ) == 0 ) {
|
if( strncmp( buf, "From ", 5 ) == 0 ) {
|
||||||
fromFound = 1;
|
fromFound = 1;
|
||||||
|
@ -900,7 +900,7 @@ static void ParseMaildirFile( const char *fileName, unsigned long checksum,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( fgets( buf, 1024, f ) != NULL )
|
while( fgets( buf, sizeof buf, f ) != NULL )
|
||||||
{
|
{
|
||||||
if( strncasecmp( buf, "from: ", 6 ) == 0 )
|
if( strncasecmp( buf, "from: ", 6 ) == 0 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue