mirror of
https://github.com/transmission/transmission
synced 2024-12-24 00:34:04 +00:00
Fix a possible buffer overflow.
This commit is contained in:
parent
a9f981b095
commit
6761fb7dcd
1 changed files with 4 additions and 1 deletions
|
@ -218,7 +218,10 @@ int main( int argc, char ** argv )
|
|||
s->peersDownloading, s->peersTotal,
|
||||
s->rateUpload );
|
||||
}
|
||||
memset( &string[chars], ' ', 79 - chars );
|
||||
if( 79 > chars )
|
||||
{
|
||||
memset( &string[chars], ' ', 79 - chars );
|
||||
}
|
||||
string[79] = '\0';
|
||||
fprintf( stderr, "\r%s", string );
|
||||
|
||||
|
|
Loading…
Reference in a new issue