Re: [AD] Memory overrun in load_wav |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] Memory overrun in load_wav
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Thu, 24 Nov 2005 02:53:07 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=UDmGCGrDUOYa2ZrJ6QFZTD5aHt4VelQevb0D5W4cz6YCbRZZOyz8RycS1VwTf0c5/NZorwqLy1kGwmBpJy4p1ZekEU3W4qg53opoVspe0ZvsEGF/EJTQ/rfkWHKM6DenLb8+zen/+XM9XzJeoi09b5QrZwPeTJ25sfAP/gfphnc=
On Thursday 24 November 2005 02:41 am, Chris Jones wrote:
> Then, the
> pack_fread call attempts to read in all "length" bytes which overruns the
> buffer and crashes the program.
It shouldn't read in "length" bytes. It should read "len*bits/8" bytes.
Though, one could say having a 16-bit sound file with an odd number of bytes
of data is a bad file. But instead of letting it crash, it should probably
just ignore the last byte, which can't be a valid 16-bit sample.