< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
On 9/9/13 11:23, Dario Bozzali wrote:
The problem here is that snprintf() guarantees null termination, while Windows' _snprintf() does not (which can lead to some really nasty security bugs). Because of this flaw, the general guidance that I offer is that no one should ever use use Windows' _snprintf() -- it's fundamentally broken. I think what you really need to do is define a new function that wraps _snprintf_s, with a "count" argument set to "_TRUNCATE". /a |