On Fri, Nov 21, 2014 at 11:50 AM, Vittorio Giovara <vittorio.giov...@gmail.com> wrote: > On Sat, Nov 15, 2014 at 11:56 AM, Vittorio Giovara > <vittorio.giov...@gmail.com> wrote: >> On Wed, Nov 12, 2014 at 1:50 PM, Luca Barbato <lu_z...@gentoo.org> wrote: >>> On 12/11/14 11:13, Vittorio Giovara wrote: >>>> From: Michael Niedermayer <michae...@gmx.at> >>>> >>>> CC: libav-sta...@libav.org >>>> Bug-Id: CID 1135770 / CID 1135771 >>>> --- >>>> libavcodec/hnm4video.c | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/libavcodec/hnm4video.c b/libavcodec/hnm4video.c >>>> index b200e89..3ff9ab1 100644 >>>> --- a/libavcodec/hnm4video.c >>>> +++ b/libavcodec/hnm4video.c >>>> @@ -36,8 +36,8 @@ >>>> >>>> typedef struct Hnm4VideoContext { >>>> uint8_t version; >>>> - uint16_t width; >>>> - uint16_t height; >>>> + int width; >>>> + int height; >>>> uint8_t *current; >>>> uint8_t *previous; >>>> uint8_t *buffer1; >>>> >>> >>> How could it happen? >> >> CID 1135770 (#1 of 3): Unintended sign extension >> (SIGN_EXTENSION)sign_extension: Suspicious implicit sign extension: >> hnm->height with type unsigned short (16 bits, unsigned) is promoted >> in hnm->width * hnm->height to type int (32 bits, signed), then >> sign-extended to type unsigned long (64 bits, unsigned). If hnm->width >> * hnm->height is greater than 0x7FFFFFFF, the upper bits of the result >> will all be 1. >> >> (same for width) > > ping > > -- > Vittorio
ok'd by luca on irc -- Vittorio _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel