diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:18:47 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 16:18:47 +0200 |
commit | 37379ef0ed598ee553907d87bbf2a7dfcdbc34f1 (patch) | |
tree | 72d17bfc8574d1a4221b7fc964e186de9ef45473 /sql/discover.cc | |
parent | e71cda83c685a27a4ec4f9d3083fed3f44b22642 (diff) | |
download | mariadb-git-37379ef0ed598ee553907d87bbf2a7dfcdbc34f1.tar.gz |
limit frm size, when reading it in memory
Diffstat (limited to 'sql/discover.cc')
-rw-r--r-- | sql/discover.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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; |