News for hackers. Stuff that matters.
Re:Show HN: Demo of Wiki and Forum coded in C under 80k by vardump on Friday December 04, 2015 @01:09PM (#10677939)
To add, notably this:

_snprintf, _snprintf_l, _snwprintf, _snwprintf_l -> https://msdn.microsoft.com/en-us/library/2ts7cx93.aspx

  "If len > count, count characters are stored in buffer, no null-terminator is appended, and a negative value is returned."
Uh, what?

I guess that's why it is _snprintf and not snprintf, huh?

They do provide secure [1] versions too, but you need to be careful which one you pick. Those secure versions terminate execution in some cases if buffer length is exceeded.

[1]: https://msdn.microsoft.com/en-us/library/f30dzcf6.aspx - better remember that _TRUNCATE flag.

There are no comments on this comment yet.