From 0f9ad702c3776c8b2351ffc2e2e207b99879627f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 28 Sep 2005 08:36:24 +0000 Subject: [PATCH] ITS#4046 fix recvfrom len --- libraries/liblber/sockbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index 4960c93bb4..c30469cdec 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -46,7 +46,7 @@ #define LBER_MIN_BUFF_SIZE 4096 #endif #ifndef LBER_MAX_BUFF_SIZE -#define LBER_MAX_BUFF_SIZE 65536 +#define LBER_MAX_BUFF_SIZE (65536*256) #endif #ifndef LBER_DEFAULT_READAHEAD #define LBER_DEFAULT_READAHEAD 16384 @@ -911,6 +911,7 @@ sb_dgram_read( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len ) addrlen = sizeof( struct sockaddr ); src = buf; buf += addrlen; + len -= addrlen; rc = recvfrom( sbiod->sbiod_sb->sb_fd, buf, len, 0, src, &addrlen ); return rc > 0 ? rc+sizeof(struct sockaddr) : rc; -- 2.39.5