Unfortunately, linux snprintf() and windows snprintf() are not identical in that the windows version does not guarantee that the string is null terminated. One can use _snprintf_s() guarantee that the string is null terminated.
The msdn docs for_snprintf_s() has this call taking an additional argument for identifying the maximum number of characters (or _TRUNCATE) in order for it to behave like linux snprintf() call.
Is the missing third argument a (potential) defect in binding.cc?
Hey there. Great catch! I'm not too familiar with the particulars between Unix and Windows functions, so you may very well be correct. Care to try your hand at a patch to correct it for us?
Unfortunately, linux snprintf() and windows snprintf() are not identical in that the windows version does not guarantee that the string is null terminated. One can use _snprintf_s() guarantee that the string is null terminated.
The msdn docs for_snprintf_s() has this call taking an additional argument for identifying the maximum number of characters (or _TRUNCATE) in order for it to behave like linux snprintf() call.
Is the missing third argument a (potential) defect in binding.cc?