xcopy: Handle return from vsnprintfW (Coverity).
This commit is contained in:
parent
525a5510d1
commit
1db4c5dc67
|
@ -984,7 +984,8 @@ int XCOPY_wprintf(const WCHAR *format, ...) {
|
||||||
#define MAX_WRITECONSOLE_SIZE 65535
|
#define MAX_WRITECONSOLE_SIZE 65535
|
||||||
|
|
||||||
va_list parms;
|
va_list parms;
|
||||||
DWORD len, nOut;
|
DWORD nOut;
|
||||||
|
int len;
|
||||||
DWORD res = 0;
|
DWORD res = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1003,6 +1004,10 @@ int XCOPY_wprintf(const WCHAR *format, ...) {
|
||||||
va_start(parms, format);
|
va_start(parms, format);
|
||||||
len = vsnprintfW(output_bufW, MAX_WRITECONSOLE_SIZE/sizeof(WCHAR), format, parms);
|
len = vsnprintfW(output_bufW, MAX_WRITECONSOLE_SIZE/sizeof(WCHAR), format, parms);
|
||||||
va_end(parms);
|
va_end(parms);
|
||||||
|
if (len < 0) {
|
||||||
|
WINE_FIXME("String too long.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Try to write as unicode all the time we think its a console */
|
/* Try to write as unicode all the time we think its a console */
|
||||||
if (toConsole) {
|
if (toConsole) {
|
||||||
|
|
Loading…
Reference in New Issue