Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Anders

overflowable buffer in eternity

Recommended Posts

found this in c_io.c C_Printf.

unsigned char tempstr[10240];
...
vsprintf(tempstr, s, args);

this could cause an overflow, but this is easily fixed by using
vsnprintf(tempstr, 10240, s, args) instead.

Share this post


Link to post

no, it will take the size of the buffer, it will leave room for the zero automagicaly.

Share this post


Link to post

oh, and the retards at ms, who like to complicate things call it _vsnprintf instead.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×