GRI-2014: keep the reserved display number below x11rb's TCP-port overflow #195
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!195
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2014-pptx-display-overflow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Forge #189's remaining step was a real end-to-end
.pptxupload check ondev(no fake tools) with an auto-timed deck whose slides run longer than the 10s
idle_end_secondsdefault, and a click-advance deck. Both decks hit thefallback path intermittently instead of rendering a video, reproducing the
"pre-existing X/x11rb display-parsing issue" flagged earlier on that forge
issue as a follow-up.
Root cause:
reserve_display()inpptx_video.rspicks a virtual displaynumber from
100..65000.pptx_video_presenter's X11 client(
x11rb-protocol) always computes alocalhostTCP fallback connect targetas
6000 + displayinu16arithmetic — even thoughXvfbhere is startedwith
-nolisten tcpand is only ever reached over its Unix socket. A displayat or above
65536 - 6000 = 59536overflows that addition and panics in adebug build, so roughly 8% of renders crashed the presenter and fell back to
slide images even though the real render path was otherwise healthy.
Fix: cap the reserved display range at
100..=59535.Verification
cargo test -p server --lib pptx_video: 24/24 (new testreserved_displays_stay_below_the_x11rb_tcp_port_overflowasserts 200 drawsstay in bounds).
cargo fmt -- --check,cargo clippy -p server --lib --bins --tests -- -D warnings: clean../scripts/local-gates.sh --rust-only: every gate passed.soffice/Xvfb/ffmpeg,no fakes) for both decks named above after the fix; both produced one
videoitem.