From 155350b61bde43387ff17103f1304c84e08e798b Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 22 Jun 2009 21:05:02 +0200 Subject: [PATCH] Fixed crash bug #33 --- src/hubio.c | 1 - src/netevent.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hubio.c b/src/hubio.c index fc8f1ee..6e8284b 100644 --- a/src/hubio.c +++ b/src/hubio.c @@ -66,7 +66,6 @@ size_t hub_recvq_set(struct hub_recvq* q, void* buf, size_t bufsize) if (!bufsize) { - q->size = 0; return 0; } diff --git a/src/netevent.c b/src/netevent.c index b8d6c5e..e0ef33b 100644 --- a/src/netevent.c +++ b/src/netevent.c @@ -204,7 +204,7 @@ void net_on_read(int fd, short ev, void *arg) if (start < buf + buf_size) { - hub_recvq_set(q, buf+offset, buf_size); + hub_recvq_set(q, buf+offset, buf_size - offset); } else {