[FFmpeg-devel] [PATCH] check that reel_name length doesn't exceed UINT16_MAX
Michael Niedermayer
michaelni at gmx.at
Mon Aug 11 00:10:07 CEST 2014
On Sun, Aug 10, 2014 at 03:02:32PM -0700, Timothy Gu wrote:
> On Sun, Aug 10, 2014 at 12:01 PM, Mark Reid <mindmark at gmail.com> wrote:
> > ---
> > libavformat/movenc.c | 14 +++++++++++---
> > 1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > index 6a38e89..85fb2e8 100644
> > --- a/libavformat/movenc.c
> > +++ b/libavformat/movenc.c
> > @@ -1340,13 +1340,21 @@ static int mov_write_rtp_tag(AVIOContext *pb, MOVTrack *track)
> > return update_size(pb, pos);
> > }
> >
> > -static int mov_write_source_reference_tag(AVIOContext *pb, MOVTrack *track, const char *reel_name){
> > +static int mov_write_source_reference_tag(AVIOContext *pb, MOVTrack *track, const char *reel_name)
> > +{
> > + uint64_t str_size =strlen(reel_name);
> > + if (str_size >= UINT16_MAX){
>
> > + av_log(NULL, AV_LOG_ERROR, "reel_name length %llu is too large\n", str_size);
>
> Shouldn't llu be PRIu64?
yes, fixed
sorry i had missed it
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20140811/b38c043d/attachment.asc>
More information about the ffmpeg-devel
mailing list