]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/concat.c
avfilter/vf_identity: fix typo
[ffmpeg] / libavformat / concat.c
index 418405dd50bf5acc2bf9659d91ccd39a4cee5253..278afd997ddd6d32919226260aa7129c867a8942 100644 (file)
@@ -73,14 +73,11 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
 
     for (i = 0, len = 1; uri[i]; i++) {
         if (uri[i] == *AV_CAT_SEPARATOR) {
-            /* integer overflow */
-            if (++len == UINT_MAX / sizeof(*nodes)) {
-                return AVERROR(ENAMETOOLONG);
-            }
+            len++;
         }
     }
 
-    if (!(nodes = av_realloc(NULL, sizeof(*nodes) * len)))
+    if (!(nodes = av_realloc_array(NULL, len, sizeof(*nodes))))
         return AVERROR(ENOMEM);
     else
         data->nodes = nodes;