diff mbox series

[FFmpeg-devel,4/6] avutil/wchar_filename: Correct sizeof

Message ID 20240609154746.4173264-4-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/6] avutil/hwcontext_d3d11va: correct sizeof AVD3D11FrameDescriptor | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer June 9, 2024, 3:47 p.m. UTC
Fixes: CID1591930 Wrong sizeof argument

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavutil/wchar_filename.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h
index 868a30b5325..23cc92aa2d7 100644
--- a/libavutil/wchar_filename.h
+++ b/libavutil/wchar_filename.h
@@ -57,7 +57,7 @@  static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w,
         errno = EINVAL;
         return -1;
     }
-    *filename = (char*)av_malloc_array(num_chars, sizeof *filename);
+    *filename = av_malloc_array(num_chars, sizeof **filename);
     if (!*filename) {
         errno = ENOMEM;
         return -1;