ffmpeg | branch: master | James Almer <[email protected]> | Tue Jul 27 12:00:03 
2021 -0300| [487dfa9f04bb825669441476ffd683a7783d5ce9] | committer: James Almer

avformat/concat: check the terminating character returned by av_get_token()

Don't attempt to increase the cursor pointer if it was \0.
Fixes invalid reads.

Reviewed-by: Marton Balint <[email protected]>
Reviewed-by: Nicolas George <[email protected]>
Signed-off-by: James Almer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=487dfa9f04bb825669441476ffd683a7783d5ce9
---

 libavformat/concat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/concat.c b/libavformat/concat.c
index aec1f52d8e..2560811ff9 100644
--- a/libavformat/concat.c
+++ b/libavformat/concat.c
@@ -251,7 +251,8 @@ static av_cold int concatf_open(URLContext *h, const char 
*uri, int flags)
             err = AVERROR(ENOMEM);
             break;
         }
-        cursor++;
+        if (*cursor)
+            cursor++;
 
         if (++len == SIZE_MAX / sizeof(*nodes)) {
             av_free(node_uri);

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to