mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-30 04:47:09 -06:00
wasmi 2.0's strict limits divide the code section's size by its function count before validating it, so a module whose code section declares 0 functions but more than 1000 bytes (crafted, truncated inside the section, or a duplicate code section) panicked in Plugin::load. Check every code section for that one case before handing the bytes to wasmi and return Error::Module; everything else is still left to wasmi. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>