[PR #36] [MERGED] address crash on reading preferences #36

Closed
opened 2026-10-02 23:20:59 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cy384/ssheven/pull/36
Author: @dragorn
Created: 8/15/2026
Status: ✅ Merged
Merged: 8/26/2026
Merged by: @cy384

Base: master ← Head: master


📝 Commits (6)

  • c8ce01d strings must be null terminated before sscanf; should help with crash on
  • 71613ff attempt to fix networking going into a lockup spiral when the server
  • 83fcc52 handle cstring/pstring conversion better so that there is always room
  • 880b35a update comments in ssheaven.h for accuracy
  • 806ac1c update preferences file with the version that wrote the prefs, not the
  • 05b8549 change c++ nullptr to pure-c NULL

📊 Changes

3 files changed (+79 additions, -23 deletions)

View changed files

📝 ssheven-net.c (+42 -9)
📝 ssheven.c (+31 -9)
📝 ssheven.h (+6 -5)

📄 Description

C strings need to be null terminated before calling sscanf & other string functions; the buffer read from the preferences file wasn't explicitly terminated, which could lead to string functions losing their minds when scanning for the prefs vars.

This just ensures the last byte after the read data is null. It's at least "more correct" and fixed the system lockup on 68k for me, but may not be the total solution.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cy384/ssheven/pull/36 **Author:** [@dragorn](https://github.com/dragorn) **Created:** 8/15/2026 **Status:** ✅ Merged **Merged:** 8/26/2026 **Merged by:** [@cy384](https://github.com/cy384) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`c8ce01d`](https://github.com/cy384/ssheven/commit/c8ce01d3641529dcb1927a2efb9853c7829a1664) strings must be null terminated before sscanf; should help with crash on - [`71613ff`](https://github.com/cy384/ssheven/commit/71613ff8b5390308138fcea2d1329b27cad56840) attempt to fix networking going into a lockup spiral when the server - [`83fcc52`](https://github.com/cy384/ssheven/commit/83fcc527de3aa1eb8704a740a72094aee1d36311) handle cstring/pstring conversion better so that there is always room - [`880b35a`](https://github.com/cy384/ssheven/commit/880b35aede67020a9d2f7e29c2d786b12f77fa0f) update comments in ssheaven.h for accuracy - [`806ac1c`](https://github.com/cy384/ssheven/commit/806ac1cd957fd4257f1af3d2d5e7d95dc35ebf27) update preferences file with the version that wrote the prefs, not the - [`05b8549`](https://github.com/cy384/ssheven/commit/05b8549104721715cf1fce8a695f47f6ac814308) change c++ nullptr to pure-c NULL ### 📊 Changes **3 files changed** (+79 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `ssheven-net.c` (+42 -9) 📝 `ssheven.c` (+31 -9) 📝 `ssheven.h` (+6 -5) </details> ### 📄 Description C strings need to be null terminated before calling sscanf & other string functions; the buffer read from the preferences file wasn't explicitly terminated, which could lead to string functions losing their minds when scanning for the prefs vars. This just ensures the last byte after the read data is null. It's at least "more correct" and fixed the system lockup on 68k for me, but may not be the total solution. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-10-02 23:20:59 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github-starred/ssheven#36
No description provided.