Commit c3671e1d authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 94e293a8
......@@ -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)
{
int len = strlen(str);
if (len > 0) {
size_t len = strlen(str);
if (len > 0 && len < UINT32_MAX) {
len++;
ffio_wfourcc(pb, tag);
avio_wl32(pb, len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment