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 e9e8bea2e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/6.1
Michael Niedermayer 7 months ago
parent ffb0a4c647
commit c872336df5
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      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;

Loading…
Cancel
Save