[mpeg2desc.c:660]: (style) Array index 'hdroffs' is used before limits check.

David Binderman <[email protected]> Wed, 5 Feb 2014 11:50:20 +0000
Newsgroups gmane.comp.multimedia.dvdauthor.user
Message-ID <[email protected]>
Hello there,

I just ran the static analyser "cppcheck" over the source code
of dvdauthor-0.7.1

It said many things, including =


=A0[mpeg2desc.c:660]: (style) Array index 'hdroffs' is used before limits c=
heck.

Source code is

while (buf[hdroffs] =3D=3D 0xff && hdroffs < sizeof(buf))

Suggest put limit check before use.

Regards

David Binderman 		 	   		  =

---------------------------------------------------------------------------=
---
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=3D121051231&iu=3D/4140/ostg.c=
lktrk