From 025dbe3aa585e4002946d2bb80cba88fa15337b3 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 27 Dec 2005 21:32:33 +0000 Subject: Check on upper bounds of base64 decode git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2679 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 4cfff58a0..036f50617 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1247,7 +1247,7 @@ class TreeSocket : public InspSocket if ((ret.substr(0,7) != "ERROR :") && (ret.substr(0,6) != "CAPAB ")) { int nbytes = from64tobits(out, ret.c_str(), 1024); - if (nbytes > 0) + if ((nbytes > 0) && (nbytes < 1024)) { log(DEBUG,"m_spanningtree: decrypt %d bytes",nbytes); ctx->Decrypt(out, result, nbytes, 0); -- cgit v1.2.3