[Embed][CORE] hex2bin should always get an even amount of symbols

This commit is contained in:
Alexei Sorokin 2019-11-01 08:29:52 +03:00 committed by Diogo Peralta Cordeiro
parent 234ba7705f
commit 01696246eb

View File

@ -281,6 +281,8 @@ class MediaFile
return false;
} elseif ($ret === 0) {
return null; // No match
} elseif (strlen($matches[2]) % 2 !== 0) {
return null; // An odd length won't do for hex2bin
} else {
$filename = hex2bin($matches[2]);