]> git.sesse.net Git - ffmpeg/commitdiff
avutil/dict: av_realloc -> av_realloc_array()
authorLimin Wang <lance.lmwang@gmail.com>
Mon, 25 May 2020 15:21:27 +0000 (23:21 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Sat, 6 Jun 2020 02:32:07 +0000 (10:32 +0800)
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
libavutil/dict.c

index 0ea71386e5aeaaeae40dcf7b656b3e36872bc164..9d3d96c58b64c78a9f5ad0f5849665827d7bd0cf 100644 (file)
@@ -103,8 +103,8 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
         av_free(tag->key);
         *tag = m->elems[--m->count];
     } else if (copy_value) {
-        AVDictionaryEntry *tmp = av_realloc(m->elems,
-                                            (m->count + 1) * sizeof(*m->elems));
+        AVDictionaryEntry *tmp = av_realloc_array(m->elems,
+                                                  m->count + 1, sizeof(*m->elems));
         if (!tmp)
             goto err_out;
         m->elems = tmp;