From: Gert Doering <g...@greenie.muc.de>

Return value of mbuf_len() wrong - it's returning a length value, not
a yes/no value - so when the queue length approached 65 (full!), it
still only returned "1", leading to MBUF overflow later on.  Change
from "bool" to "int", misbehaviour gone...

Signed-off-by: Gert Doering <g...@greenie.muc.de>
---
 src/openvpn/mbuf.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/openvpn/mbuf.h b/src/openvpn/mbuf.h
index a0de679..6d5292d 100644
--- a/src/openvpn/mbuf.h
+++ b/src/openvpn/mbuf.h
@@ -83,7 +83,7 @@ mbuf_defined (const struct mbuf_set *ms)
   return ms && ms->len;
 }

-static inline bool
+static inline int
 mbuf_len (const struct mbuf_set *ms)
 {
   return ms->len;
-- 
1.7.8.6


Reply via email to