ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Sun 
Jun  9 17:47:44 2024 +0200| [e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367] | 
committer: Michael Niedermayer

avutil/wchar_filename: Correct sizeof

Fixes: CID1591930 Wrong sizeof argument

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <rob...@ycbcr.xyz>
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367
---

 libavutil/wchar_filename.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h
index 868a30b532..23cc92aa2d 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to