mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-02 07:25:02 -04:00
The decode failure diagnostic appended its fields after $@, which ends in a newline, so the payload length, alignment, unmasked-decode result and leading bytes were pushed onto a second line where nothing looked for them. $@ was also read after the unmasked-decode eval had already reset it, so the error reported was that eval's outcome rather than the failure being described. Add log_safe to flatten a message before logging, use it for the three places that interpolate $@, capture the real error before running another eval, and report the decoded byte count and the decoded leading bytes - the base64 alone does not say whether what failed to parse was truncated or simply not ours. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UvTCzCbvGt8xKQRNCSA7o8