#3 overflow in printf

open
nobody
None
5
2006-01-13
2006-01-13
Anonymous
No

client.c line 361 is:
sprintf(logmsg, "%s disconnected, %d seconds, %ld
bytes, %.2f Kbytes/second, %ld frames, %.2f fps\n",

and should be:
sprintf(logmsg, "%s disconnected, %d seconds, %lu
bytes, %.2f Kbytes/second, %ld frames, %.2f fps\n",

or long connections result in a minus number in the
logs for bytes.

I suspect seconds and frames should also be printed
as unsigned.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks