diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-12 13:36:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-12 14:15:31 +0200 |
commit | c3671e1d5760d79c083e7565d951f4628c06cf41 (patch) | |
tree | 0a90961015a6276ad2da5709ed81ddd2fca59701 /libavformat | |
parent | 94e293a83cd7e6b7fa9f3fcd90e9ddae4c274c73 (diff) | |
download | ffmpeg-c3671e1d5760d79c083e7565d951f4628c06cf41.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/riffenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index a629b8aaa8..d429df0ba3 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -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); |