[Ffmpeg-devel] [PATCH] THP PCM decoder (GSoC Qualification)
Michael Niedermayer
michaelni
Fri Apr 6 00:17:33 CEST 2007
Hi
On Thu, Apr 05, 2007 at 11:33:21PM +0200, Marco Gerards wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
> Hi,
>
> [...]
>
> >> >> + if (samples + samplecnt >= samples_end) {
> >> >> + av_log(avctx, AV_LOG_ERROR, "allocated output buffer is too small\n");
> >> >> + return -1;
> >> >> + }
> >> >
> >> > this is twofold buggy
> >>
> >> Ehm right... Do you mean it should be "samples + samplecnt * st > samples_end"?
> >
> > you are on the right track toward fixing one of 2 bugs in this line of code
> > but you rather just introduced a third one
>
> In the beginning of this function there is a "samples_end= samples +
> *data_size/2;".
yes
> So do you mean I do not have to take care of stereo
> in this check?
wrong
> Or what are the bugs you mean?
buffer overflow / segfault / exploit / ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
1. write clean, simple and working code
2. high level optimizations
3. low level optimizations
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070406/f14f84c1/attachment.pgp>
More information about the ffmpeg-devel
mailing list