Skip to content

survive_default_devices: Fix lighthousedb.json failed to parse JSON #361

Open
Acridine wants to merge 1 commit intocollabora:masterfrom
Acridine:fix_lighthousedb_loading
Open

survive_default_devices: Fix lighthousedb.json failed to parse JSON #361
Acridine wants to merge 1 commit intocollabora:masterfrom
Acridine:fix_lighthousedb_loading

Conversation

@Acridine
Copy link
Copy Markdown

@Acridine Acridine commented May 8, 2026

This fixes issue #359, where the parsing of a lighthousedb.json generated with SteamVR fails.

Root Cause

Missing null-termination ('\0') and unchecked partial fread() results.

Changes

In survive_default_devices.c:

  • added '\0' terminator to the loaded file buffer
  • validated that fread() reads the full file before parsing.

@Acridine Acridine changed the title Fixes #359 survive_default_devices: Fix lighthousedb.json failed to parse JSON May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant