projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strlen to mb_strlen with ASCII charset to avoid binary string wrong length calculation
[brisk.git]
/
web
/
Obj
/
brisk.phh
diff --git
a/web/Obj/brisk.phh
b/web/Obj/brisk.phh
index
8b0e8e4
..
fa53c62
100644
(file)
--- a/
web/Obj/brisk.phh
+++ b/
web/Obj/brisk.phh
@@
-858,7
+858,7
@@
class User {
break;
if (($s = fread($fp, 8)) == FALSE)
break;
break;
if (($s = fread($fp, 8)) == FALSE)
break;
- if (
strlen($s
) != 8)
+ if (
mb_strlen($s, "ASCII"
) != 8)
break;
$arr = unpack('Ls/Li', $s);
fclose($fp);
break;
$arr = unpack('Ls/Li', $s);
fclose($fp);
@@
-2494,7
+2494,7
@@
class Room {
break;
if (($s = fread($fp, 4)) == FALSE)
break;
break;
if (($s = fread($fp, 4)) == FALSE)
break;
- if (
strlen($s
) != 4)
+ if (
mb_strlen($s, "ASCII"
) != 4)
break;
$arr = unpack('Le', $s);
if ($arr['e'] > $tm)
break;
$arr = unpack('Le', $s);
if ($arr['e'] > $tm)