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 4c128ea162)

Conflicts:

	libavutil/dict.c
This commit is contained in:
Michael Niedermayer 2015-05-10 16:09:07 +02:00
parent df9eca44f8
commit cf6cbcca7e

View File

@ -107,7 +107,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
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)
goto err_out;