modified lib/sdk/crt/conio/cprintf.c

Call va_start before, and va_end after, each call to _vsnprintf

modified   ntoskrnl/ntoskrnl.pspec
   We pass all include directories and defines to the pspec preprocessor, so we can omit paths in pspec includes

svn path=/trunk/; revision=37196
This commit is contained in:
KJK::Hyperion 2008-11-05 01:14:54 +00:00
parent f08fcecb82
commit d4e2952aa7
2 changed files with 6 additions and 2 deletions

View file

@ -18,6 +18,8 @@ _cprintf(const char *fmt, ...)
int written, resize = sizeof(buf), retval;
va_list valist;
va_start( valist, fmt );
while ((written = _vsnprintf( mem, resize, fmt, valist )) == -1 ||
written > resize)
{
@ -26,9 +28,11 @@ _cprintf(const char *fmt, ...)
free (mem);
if (!(mem = (char *)malloc(resize)))
return EOF;
va_end ( valist );
va_start( valist, fmt );
}
va_end(valist);
va_end ( valist );
retval = _cputs( mem );
if (mem != buf)
free (mem);

View file

@ -1,4 +1,4 @@
#include "include/reactos/msvctarget.h"
#include <msvctarget.h>
@ stdcall CcCanIWrite(ptr long long long)
@ stdcall CcCopyRead(ptr ptr long long ptr ptr)