avformat/mov: Use sizeof(filename) instead of a literal number
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Mar 2015 20:23:32 +0000 (21:23 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 00:52:53 +0000 (01:52 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 21a53dd08dce7cc5b3fdf9c4826b4b74d8300ea0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c

index 7455e3b..39f30e4 100644 (file)
@@ -2486,9 +2486,9 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref,
             filename[src_path - src] = 0;
 
             for (i = 1; i < ref->nlvl_from; i++)
-                av_strlcat(filename, "../", 1024);
+                av_strlcat(filename, "../", sizeof(filename));
 
-            av_strlcat(filename, ref->path + l + 1, 1024);
+            av_strlcat(filename, ref->path + l + 1, sizeof(filename));
 
             if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL))
                 return 0;