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
1 changed files with 1 additions and 1 deletions

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;