Commit 0b6c8bb2 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/dict: Use size_t for appending strings

the string length is not constrained to INT_MAX
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4c128ea1)

Conflicts:

	libavutil/dict.c
parent 9f9af1dd
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment