From 37379ef0ed598ee553907d87bbf2a7dfcdbc34f1 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 9 Apr 2013 16:18:47 +0200 Subject: limit frm size, when reading it in memory --- sql/discover.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/discover.cc') diff --git a/sql/discover.cc b/sql/discover.cc index a499e234a8f..5add741fc0c 100644 --- a/sql/discover.cc +++ b/sql/discover.cc @@ -70,7 +70,7 @@ int readfrm(const char *name, const uchar **frmdata, size_t *len) error= 2; if (mysql_file_fstat(file, &state, MYF(0))) goto err; - read_len= (size_t)state.st_size; + read_len= (size_t)min(FRM_MAX_SIZE, state.st_size); // safety // Read whole frm file error= 3; -- cgit v1.2.1