Re: [AD] Memory overrun in load_wav |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-11-26, Chris Jones <allegdev@xxxxxxxxxx> wrote:
> > > It shouldn't read in "length" bytes. It should read "len*bits/8" bytes.
> >
> > Can someone provide a patch for this? Thanks.
>
> Well, it has to read in "length" bytes since that is the amount of data in
> the WAV chunk, so if we modified the fread loop it'd have to do an extra
> fgetc if there was an odd byte left over. Therefore, I think Vincent's patch
> is the easiest solution.
>
> I've attached a diff for it, not sure whether this can be applied against
> CVS directly or not.
Ok. I committed a more explicit patch that does the same thing.
Peter