From fdc62caf3075d02c0a65368cd43c98dde04e4185 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 10 May 2015 16:09:07 +0200 Subject: avutil/dict: Use size_t for appending strings the string length is not constrained to INT_MAX Signed-off-by: Michael Niedermayer (cherry picked from commit 4c128ea1629116fc4936edc5f96bbd18f3ef1647) Conflicts: libavutil/dict.c --- libavutil/dict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavutil') 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); -- cgit v1.2.3