mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-23 15:53:08 +00:00
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:
parent
4950bd4ebe
commit
4c128ea162
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user