Browse Source

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>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
4c128ea162
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/dict.c

+ 1
- 1
libavutil/dict.c 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;


Loading…
Cancel
Save