summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-05-22 21:18:50 +0100
committerPeter Powell <petpow@saberuk.com>2013-06-06 01:45:04 +0100
commit37d97550b147e0d14f6a9e279f8505b7d49c84bb (patch)
tree207d703258746f1bc0902c638e511d60437dfb44 /src/modules
parente01df6385ef2ad1c0a78ccdd08af9af3ce688264 (diff)
Convert a ton of uses of MAXBUF to use a fixed buffer size.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_mssql.cpp4
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
-rw-r--r--src/modules/m_ident.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp
index 244aa0922..9d9622fde 100644
--- a/src/modules/extra/m_mssql.cpp
+++ b/src/modules/extra/m_mssql.cpp
@@ -472,8 +472,8 @@ class SQLConn : public classbase
if (sock->res_info->row_count > 0)
{
int cols = sock->res_info->num_cols;
- char** name = new char*[MAXBUF];
- char** data = new char*[MAXBUF];
+ char** name = new char*[512];
+ char** data = new char*[512];
for (int j=0; j<cols; j++)
{
TDSCOLUMN* col = sock->current_results->columns[j];
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 8faee2da7..f9fddd5a1 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -803,8 +803,8 @@ class ModuleSSLGnuTLS : public Module
int ret;
unsigned int cert_list_size;
gnutls_x509_crt_t cert;
- char name[MAXBUF];
- unsigned char digest[MAXBUF];
+ char name[512];
+ unsigned char digest[512];
size_t digest_size = sizeof(digest);
size_t name_size = sizeof(name);
ssl_cert* certinfo = new ssl_cert;
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 00ff75f59..9f67a6242 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -213,8 +213,8 @@ class IdentRequestSocket : public EventHandler
/* We don't really need to buffer for incomplete replies here, since IDENT replies are
* extremely short - there is *no* sane reason it'd be in more than one packet
*/
- char ibuf[MAXBUF];
- int recvresult = ServerInstance->SE->Recv(this, ibuf, MAXBUF-1, 0);
+ char ibuf[256];
+ int recvresult = ServerInstance->SE->Recv(this, ibuf, sizeof(ibuf)-1, 0);
/* Close (but don't delete from memory) our socket
* and flag as done since the ident lookup has finished