From 0eb91763fa45838777c4269a423d634530a20219 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 1 Jun 2009 01:52:57 +0200 Subject: [PATCH] Potential crash fix. --- src/hubio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hubio.c b/src/hubio.c index e06462f..46c6069 100644 --- a/src/hubio.c +++ b/src/hubio.c @@ -65,7 +65,10 @@ size_t hub_recvq_set(struct hub_recvq* q, void* buf, size_t bufsize) } if (!bufsize) + { + q->size = 0; return 0; + } q->buf = hub_malloc(bufsize); if (!q->buf)