aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rwxr-xr-xinclude/text.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 53b92c05f..e3b1f1c4e 100755
--- a/include/text.php
+++ b/include/text.php
@@ -278,6 +278,11 @@ function hex2bin($s) {
if(! (is_string($s) && strlen($s)))
return '';
+ if(strlen($s) & 1) {
+ logger('hex2bin: illegal hex string: ' . $s);
+ return $s;
+ }
+
if(! ctype_xdigit($s)) {
return($s);
}