You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should place parameter values instead of variables that return 256 bytes of gibberish.
= >
temp [256]. /* Small buffer for first vsnprintf */
If (bytes < sizeof (temp))
{
/ *
Hey, the formatted string fits in the tiny buffer, so just dup that...
/
Return (strdup (temp));
}
The solution
if (bytes < sizeof(temp))
{
/*
* Hey, the formatted string fits in the tiny buffer, so just dup that...
*/
vsprintf_s(temp, 256, format, ap);
return (strdup(temp));
}
The text was updated successfully, but these errors were encountered:
OK, so this is on Windows? Looks like the conditional code should be expanded so that the _vscprintf code immediately falls on the malloc and vsnprintf to the malloc'd buffer.
* Fix makesrcdist script's archive generation (Issue michaelrsweet#242)
* Add CDATA test of varying lengths, as it looks like we might have yet another
MS C runtime issue with va_copy... :/
* The `mxmlSetOpaquef` and `mxmlSetTextf` functions did not work (Issue michaelrsweet#244)
Use _mxml_vstrdupf function, not _mxml_strdupf.
* Fix _mxml_vsnprintf on Windows (Issue michaelrsweet#245)
You should place parameter values instead of variables that return 256 bytes of gibberish.
= >
temp [256]. /* Small buffer for first vsnprintf */
If (bytes < sizeof (temp))
{
/ *
Return (strdup (temp));
}
The solution
if (bytes < sizeof(temp))
{
/*
* Hey, the formatted string fits in the tiny buffer, so just dup that...
*/
vsprintf_s(temp, 256, format, ap);
return (strdup(temp));
}
The text was updated successfully, but these errors were encountered: