diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-10 16:09:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-17 21:50:06 +0200 |
commit | 0b6c8bb26c623ec1f6484cb1071c67ad1f9662db (patch) | |
tree | 9b433eda16658038d361e6a6d0d639b1dbd9be70 | |
parent | 9f9af1dd04fb0b8359f229d407d4f98515f25460 (diff) | |
download | ffmpeg-0b6c8bb26c623ec1f6484cb1071c67ad1f9662db.tar.gz |
avutil/dict: Use size_t for appending strings
the string length is not constrained to INT_MAX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4c128ea1629116fc4936edc5f96bbd18f3ef1647)
Conflicts:
libavutil/dict.c
-rw-r--r-- | libavutil/dict.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c index 3a0e84cd40..73dbfd55a0 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -92,7 +92,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags if (flags & AV_DICT_DONT_STRDUP_VAL) { m->elems[m->count].value = (char*)(intptr_t)value; } else if (oldval && flags & AV_DICT_APPEND) { - int len = strlen(oldval) + strlen(value) + 1; + size_t len = strlen(oldval) + strlen(value) + 1; char *newval = av_mallocz(len); if (!newval) return AVERROR(ENOMEM); |