mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 13:45:34 +02:00
limit frm size, when reading it in memory
This commit is contained in:
parent
e71cda83c6
commit
37379ef0ed
3 changed files with 8 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue