Quoting Diego Biurrun (2015-04-11 11:00:51)
> On Sat, Apr 11, 2015 at 02:11:06AM +0530, Himangi Saraogi wrote:
> > ---
> >  libavcodec/faxcompr.c | 2 +-
> >  libavformat/ac3dec.c  | 2 +-
> >  libavformat/mp3dec.c  | 2 +-
> >  libavformat/rtmppkt.c | 3 ++-
> >  4 files changed, 5 insertions(+), 4 deletions(-)
> 
> Is this an attempt to find and fix all instances?  There are more, even in
> rtmppkt.c for starters.  Try
> 
> git grep 'unsigned .*=[ ]*-[0-9]'
> git grep 'uint.*=[ ]*-[0-9]'
> 
> > --- a/libavformat/rtmppkt.c
> > +++ b/libavformat/rtmppkt.c
> > @@ -538,7 +538,8 @@ static const char* rtmp_packet_type(int type)
> >  static void amf_tag_contents(void *ctx, const uint8_t *data,
> >                               const uint8_t *data_end)
> >  {
> > -    unsigned int size, nb = -1;
> > +    unsigned int size;
> > +    uint32_t nb = UINT32_MAX;
> 
> This is not correct, nb is assigned the return value from
> bystream_get_be32(), which is unsigned int.
> 

Stab. bytestream_get_be32 will obviously be at most 32bit.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to