mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-08 14:36:22 +01:00
Fix varargs leaks
This commit is contained in:
parent
dd694061b4
commit
78b2b58ab1
@ -104,6 +104,7 @@ static _inline void real_dprintf(char *format, ...)
|
|||||||
vsnprintf_s(buffer + len, sizeof(buffer)-len, sizeof(buffer)-len - 3, format, args);
|
vsnprintf_s(buffer + len, sizeof(buffer)-len, sizeof(buffer)-len - 3, format, args);
|
||||||
strcat_s(buffer, sizeof(buffer), "\r\n");
|
strcat_s(buffer, sizeof(buffer), "\r\n");
|
||||||
OutputDebugStringA(buffer);
|
OutputDebugStringA(buffer);
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,6 +21,7 @@ static _inline void real_dprintf(char *format, ...) {
|
|||||||
vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer)-3, format,args);
|
vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer)-3, format,args);
|
||||||
strcat_s(buffer, sizeof(buffer), "\r\n");
|
strcat_s(buffer, sizeof(buffer), "\r\n");
|
||||||
OutputDebugString(buffer);
|
OutputDebugString(buffer);
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple macro to close a handle and set the handle to NULL.
|
// Simple macro to close a handle and set the handle to NULL.
|
||||||
|
@ -21,6 +21,7 @@ static _inline void real_dprintf(char *format, ...) {
|
|||||||
vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer)-3, format,args);
|
vsnprintf_s(buffer, sizeof(buffer), sizeof(buffer)-3, format,args);
|
||||||
strcat_s(buffer, sizeof(buffer), "\r\n");
|
strcat_s(buffer, sizeof(buffer), "\r\n");
|
||||||
OutputDebugStringA(buffer);
|
OutputDebugStringA(buffer);
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple macro to close a handle and set the handle to NULL.
|
// Simple macro to close a handle and set the handle to NULL.
|
||||||
|
Loading…
Reference in New Issue
Block a user