Nikolay Sivov : avifil32: Use typed pointers in sizeof() and va_arg() ( Coverity).
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jan 11 08:22:28 CST 2016
Module: wine
Branch: master
Commit: 509831c027f881cc6b9aa75e221fdd51097cdef0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=509831c027f881cc6b9aa75e221fdd51097cdef0
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jan 10 19:22:35 2016 +0300
avifil32: Use typed pointers in sizeof() and va_arg() (Coverity).
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/avifil32/api.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c
index cc7e55d..7232450 100644
--- a/dlls/avifil32/api.c
+++ b/dlls/avifil32/api.c
@@ -2289,8 +2289,8 @@ HRESULT WINAPIV AVISaveA(LPCSTR szFile, CLSID * pclsidHandler, AVISAVECALLBACK l
if (nStreams <= 0) return AVIERR_BADPARAM;
- streams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
- options = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
+ streams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(*streams));
+ options = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(*options));
if (!streams || !options)
{
ret = AVIERR_MEMORY;
@@ -2303,8 +2303,8 @@ HRESULT WINAPIV AVISaveA(LPCSTR szFile, CLSID * pclsidHandler, AVISAVECALLBACK l
__ms_va_start(vl, lpOptions);
for (i = 1; i < nStreams; i++)
{
- streams[i] = va_arg(vl, void *);
- options[i] = va_arg(vl, void *);
+ streams[i] = va_arg(vl, PAVISTREAM);
+ options[i] = va_arg(vl, PAVICOMPRESSOPTIONS);
}
__ms_va_end(vl);
@@ -2332,8 +2332,8 @@ HRESULT WINAPIV AVISaveW(LPCWSTR szFile, CLSID * pclsidHandler, AVISAVECALLBACK
if (nStreams <= 0) return AVIERR_BADPARAM;
- streams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
- options = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(void *));
+ streams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(*streams));
+ options = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(*options));
if (!streams || !options)
{
ret = AVIERR_MEMORY;
@@ -2346,8 +2346,8 @@ HRESULT WINAPIV AVISaveW(LPCWSTR szFile, CLSID * pclsidHandler, AVISAVECALLBACK
__ms_va_start(vl, lpOptions);
for (i = 1; i < nStreams; i++)
{
- streams[i] = va_arg(vl, void *);
- options[i] = va_arg(vl, void *);
+ streams[i] = va_arg(vl, PAVISTREAM);
+ options[i] = va_arg(vl, PAVICOMPRESSOPTIONS);
}
__ms_va_end(vl);
More information about the wine-cvs
mailing list