1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

avutil/wchar_filename: Correct sizeof

Fixes: CID1591930 Wrong sizeof argument

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <robux4@ycbcr.xyz>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-06-09 17:47:44 +02:00
parent d7912a6d4a
commit 740fb498e1
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -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;