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>
This commit is contained in:
Michael Niedermayer 2015-05-10 16:09:07 +02:00
parent 4950bd4ebe
commit 4c128ea162

View File

@ -109,7 +109,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
m->elems[m->count].key = copy_key;
m->elems[m->count].value = copy_value;
if (oldval && flags & AV_DICT_APPEND) {
int len = strlen(oldval) + strlen(copy_value) + 1;
size_t len = strlen(oldval) + strlen(copy_value) + 1;
char *newval = av_mallocz(len);
if (!newval)
goto err_out;