limit frm size, when reading it in memory

This commit is contained in:
Sergei Golubchik 2013-04-09 16:18:47 +02:00
commit 37379ef0ed
3 changed files with 8 additions and 4 deletions

View file

@ -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;