Jump to content

_snprintf and _vsnprintf don't guarantee null termination.


Guest Vinolentus
 Share

Recommended Posts

* What bug does the patch fix? What features does the patch add?

Each of these functions takes a pointer to an argument list, then formats the data, and writes up to count characters to the memory pointed to by buffer. If there is room at the end (that is, if the number of characters to write is less than count), the buffer will be null-terminated.

http://msdn.microsoft.com/en-us/library/2ts7cx93.aspx

http://msdn.microsoft.com/en-us/library/1kt27hek.aspx

* For which repository revision was the patch created?

11741

* Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No.

* Who has been writing this patch? Please include either forum user names or email addresses.

Me.

https://gist.github.com/1087268

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use