[FFmpeg-devel] [PATCH 14/14] avformat/rtmpproto: reserve enough space for statusmsg
Michael Niedermayer
michael at niedermayer.cc
Tue Dec 17 00:40:42 EET 2024
On Mon, Dec 16, 2024 at 11:29:11PM +0100, Timo Rothenpieler wrote:
> On 16.12.2024 23:26, Michael Niedermayer wrote:
> > On Mon, Dec 16, 2024 at 08:44:54PM +0100, Timo Rothenpieler wrote:
> > > On 15.12.2024 23:43, Michael Niedermayer wrote:
> > > > Hi
> > > >
> > > > On Thu, Dec 12, 2024 at 08:55:39PM +0100, Timo Rothenpieler wrote:
> > > > > ---
> > > > > libavformat/rtmpproto.c | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
> > > > > index a56fec759f..a5e877cc55 100644
> > > > > --- a/libavformat/rtmpproto.c
> > > > > +++ b/libavformat/rtmpproto.c
> > > > > @@ -2004,7 +2004,7 @@ static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
> > > > > pp = spkt.data;
> > > > > ff_amf_write_string(&pp, "onFCPublish");
> > > > > } else if (!strcmp(command, "publish")) {
> > > > > - char statusmsg[128];
> > > > > + char statusmsg[160];
> > > >
> > > > can you explain why this is enough and an example why the 128 was not
> > > > (not important but if you have that info it would make the comit message
> > > > more informative)
> > >
> > > It's basically just the max size of the buffer that's written to it, plus
> > > the size of the other stuff in the format string, plus a bit of padding.
> >
> > would this merrit a
> > #define STATUS_MSG_MAX_SIZE 160 //the max size of the buffer that's written to it, plus the size of the other stuff in the format string, plus a bit of padding.
>
> Seems a bit silly, but it could totaly be sizeof(buf) + 32.
ok
thx
[...]
--
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: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241216/bd76a3c7/attachment.sig>
More information about the ffmpeg-devel
mailing list