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>
This commit is contained in:
Michael Niedermayer 2024-06-09 17:47:44 +02:00
parent 628ba061c8
commit e9e8bea2e7
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;