[Embed][CORE] hex2bin should always get an even amount of symbols
This commit is contained in:
parent
bddc1c0f9d
commit
85be003cf5
@ -281,6 +281,8 @@ class MediaFile
|
|||||||
return false;
|
return false;
|
||||||
} elseif ($ret === 0) {
|
} elseif ($ret === 0) {
|
||||||
return null; // No match
|
return null; // No match
|
||||||
|
} elseif (strlen($matches[2]) % 2 !== 0) {
|
||||||
|
return null; // An odd length won't do for hex2bin
|
||||||
} else {
|
} else {
|
||||||
$filename = hex2bin($matches[2]);
|
$filename = hex2bin($matches[2]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user