mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-23 04:59:37 -04:00
The PHP shared memory map in web/includes/Monitor.php was not updated when last_analysis_viewed_time was added to SharedData (zm_monitor.h, offset +152), so every field from control_state onward was read 8 bytes early: control_state, alarm_cause, video_fifo, audio_fifo and janus_pin. The TriggerData base offset (864) had been updated, so only the SharedData tail was skewed. The error goes undetected because connect() only checks the 'valid' byte at +88, which sits in the unaffected region, and never compares the 'size' field. Also corrects the TriggerData showtext offset: 'text' is 256 bytes at 912, so 'showtext' starts at 1168, not 1268. The Perl map (Memory.pm.in) computes offsets from the field sequence and is unaffected. Tests: php -l passes; offsets verified field-by-field against the SharedData struct in src/zm_monitor.h on master. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>