Nikolay Sivov : mfplat: Add a warning for buffer method failure (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Mar 30 16:24:26 CDT 2020


Module: wine
Branch: master
Commit: 910ec21b5ab9b7613e0a1cc8bda108033b5496d4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=910ec21b5ab9b7613e0a1cc8bda108033b5496d4

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Mar 30 14:21:28 2020 +0300

mfplat: Add a warning for buffer method failure (Coverity).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfplat/buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c
index 4bbb36b683..1a31299d24 100644
--- a/dlls/mfplat/buffer.c
+++ b/dlls/mfplat/buffer.c
@@ -1211,7 +1211,8 @@ static HRESULT sample_copy_to_buffer(struct sample *sample, IMFMediaBuffer *buff
         }
     }
 
-    IMFMediaBuffer_SetCurrentLength(buffer, dst_current_length);
+    if (FAILED(IMFMediaBuffer_SetCurrentLength(buffer, dst_current_length)))
+        WARN("Failed to set buffer length.\n");
 
     if (locked)
         IMFMediaBuffer_Unlock(buffer);




More information about the wine-cvs mailing list