mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Don't crash when parsing overly long enum type
This commit is contained in:
@@ -152,7 +152,7 @@ function edit_type($key, $field, $collations, $foreign_keys = array()) {
|
||||
*/
|
||||
function process_length($length) {
|
||||
global $enum_length;
|
||||
return (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches) ? implode(",", $matches[0]) : preg_replace('~[^0-9,+-]~', '', $length));
|
||||
return (preg_match("~^\\s*$enum_length(?:\\s*,\\s*$enum_length)*+\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches) ? implode(",", $matches[0]) : preg_replace('~[^0-9,+-]~', '', $length));
|
||||
}
|
||||
|
||||
/** Create SQL string from field type
|
||||
|
Reference in New Issue
Block a user