[MySQL] SET editing form INT overflow
Database management in a single PHP file
Brought to you by:
jakubvrana
Adminer 4.2.3-dev (but probably all versions)
MySQL 5.7.7-rc-log
PHP x86 Version 5.6.2 FastCGI
Windows 8.1 64b
SET can obtain up to 64 items. Unfortunately because of bitwise arithmetics in Adminer editing form overflows by 32b long INT on Windows PHP interpret. Then not only checkboxes that should be checked are checked but also every n+32 checkbox is checked as well.
Problematic code:
$checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true));
functions.inc.php, line 891
On 64b PHP interpret (linux os) problem doesn't appear.
PHP 7 Windows builds support 64 bits but Adminer should fix this for other versions.
Fixed by 37e63dd8.