[FFmpeg-devel] [PATCH] ffserver: initialize pbuffer in prepare_sdp_description()
Michael Niedermayer
michaelni at gmx.at
Sat Aug 2 18:33:18 CEST 2014
On Sat, Aug 02, 2014 at 04:51:16PM +0200, Stefano Sabatini wrote:
> On date Saturday 2014-08-02 14:25:21 +0200, Michael Niedermayer encoded:
> > also check pbuffer before use
> >
> > Found-by: CSA
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > ffserver.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/ffserver.c b/ffserver.c
> > index 00153b4..956d9f5 100644
> > --- a/ffserver.c
> > +++ b/ffserver.c
> > @@ -2977,6 +2977,8 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
> > AVDictionaryEntry *entry = av_dict_get(stream->metadata, "title", NULL, 0);
> > int i;
> >
> > + *pbuffer = NULL;
> > +
> > avc = avformat_alloc_context();
> > if (avc == NULL || !rtp_format) {
> > return -1;
> > @@ -3013,7 +3015,7 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
> > av_free(avc);
> > av_free(avs);
> >
> > - return strlen(*pbuffer);
> > + return *pbuffer ? strlen(*pbuffer) : AVERROR(ENOMEM);
> > }
> >
> > static void rtsp_cmd_options(HTTPContext *c, const char *url)
>
> LGTM.
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140802/0db54bc7/attachment.asc>
More information about the ffmpeg-devel
mailing list