[gnutls-dev][PATCH] inappropriate buffer check in _gnutls_io_read_buffered

Nikos Mavroyanopoulos nmav@gnutls.org
Thu Mar 6 21:24:02 2003


On Thu, Mar 06, 2003 at 11:12:11AM -0500, Ian Peters wrote:

> > > Hi,
> > > I'm integrating GnuTLS support into our internal HTTP transfer library,
> > > and I was running into some problems with UNEXPECTED_PACKET_LENGTH
> > > errors.  I eventually tracked these down to one place, in
> > > _gnutls_recv_int, which calls _gnutls_io_read_buffered.
> > > The first check in that function verifies that the received packet isn't
> > > larger than the MAX_RECV_SIZE, but the third condition appears to be
> > > bogus.  Specifically, _gnutls_io_read_buffered will be recalled in cases
> > > where GNUTLS_E_AGAIN, which lead to the function incorrectly returning
> > > GNUTLS_E_INVALID_REQUEST.  The attached patch seems to fix the issue.
> > Hello Ian.
> >   I've quite changed that patch. Does the attached also solve the problem?
> With a little massaging to apply cleanly to my 0.8.3 tree, it works
> perfectly, thanks.
> FWIW, if you edit any of your source in lib/ or libextra/ of a
> distributed gnutls tarball, you have to comment out the all-local target
> in the Makefile to get it to stop trying to build the docs, as it's
> looking for ../doc/scripts/gdoc, which isn't distributed.

I've commited the fix, and I've made the doc generation happen only when
creating the distribution.

> 
> Ian
> 

-- 
Nikos Mavroyanopoulos