From: Peter van Dijk Date: Thu, 11 Aug 2016 14:45:22 +0000 (+0200) Subject: limit size of mysql cell to 128 kilobytes X-Git-Tag: dnsdist-1.1.0-beta2~146^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9acd983b8de33c3d2d70a8cb0c9e3bdc2adca7a9;p=thirdparty%2Fpdns.git limit size of mysql cell to 128 kilobytes --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index daac6ab49a..6437e96d4a 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -172,6 +172,7 @@ public: for(int i = 0; i < d_fnum; i++) { unsigned long len = std::max(fields[i].max_length, fields[i].length)+1; + if (len > 128 * 1024) len = 128 * 1024; // LONGTEXT may tell us it needs 4GB! d_res_bind[i].is_null = new my_bool[1]; d_res_bind[i].error = new my_bool[1]; d_res_bind[i].length = new unsigned long[1];