]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mov.c
rtpenc: Avoid brittle switch fallthroughs
[ffmpeg] / libavformat / mov.c
index a64ff4fa1944f70ad6d732daa2a3576053fe6b7b..4590a2de746bb8c3a2ef449dc7c0b27bb9832620 100644 (file)
@@ -383,7 +383,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         return AVERROR_INVALIDDATA;
 
     // allocate twice as much as worst-case
-    str_size_alloc = raw ? str_size + 1 : str_size * 2;
+    str_size_alloc = (raw ? str_size : str_size * 2) + 1;
     str = av_malloc(str_size_alloc);
     if (!str)
         return AVERROR(ENOMEM);