[Libburn] patch preventing pointer error in libburn/sector.c
Derek Foreman
manmower at signalmarketing.com
Mon Jan 2 17:17:20 PST 2006
Hah, I should read your mail in order.
I just hit this roadblock myself, it's part of why "tail" padding isn't
working at all. The fix for that is a little more involved, and should be
in cvs tonight.
On Thu, 8 Dec 2005, scdbackup at gmx.net wrote:
> Hi,
>
> attached is a small patch for a potential bug in
> sector.c:get_bytes() (CVS version of today).
>
> It would occur if read(2) returns -1 and no further
> source is available in the link chain :
>
> valid = src->read(src, data, count);
> shortage = count - valid;
> ...
> if (shortage) {
> if (src->next) {
> ...
> }
> memset(data + valid, 0, shortage);
>
> This would copy count+1 zeros to address data-1 (!).
>
> The remedy is, of course, to set valid to 0 in this case.
>
>
> Have a nice day :)
>
> Thomas
>
> --
> 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
> +++ GMX - die erste Adresse für Mail, Message, More +++
More information about the libburn
mailing list