mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/riffenc: Use size_t for strlen in ff_riff_write_info_tag()
Also dont generated corrupted output for larger than 4gb strings Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
94e293a83c
commit
c3671e1d57
@ -269,8 +269,8 @@ void ff_parse_specific_params(AVStream *st, int *au_rate,
|
|||||||
|
|
||||||
void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str)
|
void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str)
|
||||||
{
|
{
|
||||||
int len = strlen(str);
|
size_t len = strlen(str);
|
||||||
if (len > 0) {
|
if (len > 0 && len < UINT32_MAX) {
|
||||||
len++;
|
len++;
|
||||||
ffio_wfourcc(pb, tag);
|
ffio_wfourcc(pb, tag);
|
||||||
avio_wl32(pb, len);
|
avio_wl32(pb, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user