[PATCH] attrib: fixed a allocation size (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Sep 29 06:01:51 CDT 2013
1099512 Wrong size argument
we use this buffer and a A buffer with the same bytesize.
So just make it characterwise as large as the A buffer.
Ciao, Marcus
---
programs/attrib/attrib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c
index 443a0c0..4342779 100644
--- a/programs/attrib/attrib.c
+++ b/programs/attrib/attrib.c
@@ -68,7 +68,7 @@ static int __cdecl ATTRIB_wprintf(const WCHAR *format, ...)
*/
if (!output_bufW) output_bufW = HeapAlloc(GetProcessHeap(), 0,
- MAX_WRITECONSOLE_SIZE);
+ MAX_WRITECONSOLE_SIZE*sizeof(WCHAR));
if (!output_bufW) {
WINE_FIXME("Out of memory - could not allocate 2 x 64K buffers\n");
return 0;
--
1.7.10.4
More information about the wine-patches
mailing list