From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] libaformat: fix incorrect handling of incomplete AVBPrint. Date: Thu, 22 Jun 2023 22:01:49 -0300 Message-ID: <0f571b61-00ab-0297-3883-c58f3edc5e17@gmail.com> (raw) In-Reply-To: <20230622210451.16411-1-Reimar.Doeffinger@gmx.de> On 6/22/2023 6:04 PM, Reimar.Doeffinger@gmx.de wrote: > diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c > index c281dec346..9f6aab789e 100644 > --- a/libavformat/realtextdec.c > +++ b/libavformat/realtextdec.c > @@ -80,6 +80,11 @@ static int realtext_read_header(AVFormatContext *s) > const int64_t pos = ff_text_pos(&tr) - (c != 0); > int n = ff_smil_extract_next_text_chunk(&tr, &buf, &c); > > + if (n < 0) > + { Put the opening bracket in the same line as the if(), please. > + res = n; > + goto end; > + } > if (n == 0) > break; > > @@ -103,7 +108,7 @@ static int realtext_read_header(AVFormatContext *s) > /* if we just read a <time> tag, introduce a new event, otherwise merge > * with the previous one */ > int merge = !av_strncasecmp(buf.str, "<time", 5) ? 0 : 1; > - sub = ff_subtitles_queue_insert(&rt->q, buf.str, buf.len, merge); > + sub = ff_subtitles_queue_insert_bprint(&rt->q, &buf, merge); > if (!sub) { > res = AVERROR(ENOMEM); > goto end; > diff --git a/libavformat/samidec.c b/libavformat/samidec.c > index 0da299343d..6fff6019bf 100644 > --- a/libavformat/samidec.c > +++ b/libavformat/samidec.c > @@ -68,6 +68,11 @@ static int sami_read_header(AVFormatContext *s) > const int64_t pos = ff_text_pos(&tr) - (c != 0); > int is_sync, is_body, n = ff_smil_extract_next_text_chunk(&tr, &buf, &c); > > + if (n < 0) > + { Ditto. > + res = n; > + goto end; > + } > if (n == 0) > break; _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-06-23 1:02 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-22 21:04 Reimar.Doeffinger 2023-06-23 1:01 ` James Almer [this message] [not found] <12826EED-5CFC-4DC4-ACEE-0BB505704FE7@reimardoeffinger.de> 2023-07-23 12:00 ` Reimar.Doeffinger 2023-07-27 17:26 ` Reimar Döffinger 2023-07-27 17:33 ` Nicolas George 2023-07-27 17:42 ` Reimar Döffinger 2023-07-27 17:44 ` Nicolas George 2023-07-29 14:31 ` Reimar Döffinger
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=0f571b61-00ab-0297-3883-c58f3edc5e17@gmail.com \ --to=jamrial@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git