sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sks-devel] Re: zero-length MPIs (was: Re: mpi error with check-trus


From: David Shaw
Subject: Re: [Sks-devel] Re: zero-length MPIs (was: Re: mpi error with check-trustdb in 1.4.2 - resolved)
Date: Wed, 31 Aug 2005 23:05:16 -0400
User-agent: Mutt/1.5.8i

On Wed, Aug 24, 2005 at 03:07:17PM +0200, Klaus Singvogel wrote:

> I noticed that these messages are coming from
> mpi/mpicoder.c:mpi_read() and had a closer look at it. :-)
> 
> The second if check, for "goto overflow;" seems a bit doubtful (maybe
> a copy&paste without to much thinking whats coming next ? :-) As
> there are no mandatory reads from the iobuf coming, only optional
> reads, I changed the code to "if (++nread > nmax)" and the problem
> was gone (see attached patch).

I think this is very close, but not perfect.  You must also protect
against accidentally reading too many bytes, as then you can't parse
the rest of the stream.

Try this patch.

David

Attachment: mpi.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]