Commit 62e0223c authored by natalie's avatar natalie 💜
Browse files

structhelper: Don't blow up if there's too much data

parent 38a02263
......@@ -297,7 +297,11 @@
$actual = strlen($data);
if ($actual != $expected) {
log_add("StructHelper", "Wrong data size for $type in unpack - expected $expected, got $actual");
return false;
if ($actual > $expected) {
log_add("StructHelper", "Extra data on the end, continuing anyway...");
} else {
return false;
global $structdefs;
$out = array();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment