[PATCH] avifil32: Use typed pointers in sizeof() (Coverity)
Bruno Jesus
00cpxxx at gmail.com
Sun Jan 10 10:02:37 CST 2016
On Sun, Jan 10, 2016 at 10:35 PM, Nikolay Sivov <nsivov at codeweavers.com> wrote:
> Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
> ---
> dlls/avifil32/api.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c
> index c71efb4..a88e3bf 100644
> --- a/dlls/avifil32/api.c
> +++ b/dlls/avifil32/api.c
> @@ -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));
Hi, Nikolay. What about AviSaveA? The structure of code is identical.
Also in the loop I used void * to get the next arg from the list,
could that be a problem?
Best wishes,
Bruno
More information about the wine-devel
mailing list