Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix storing of lan log segfault #441

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

airween
Copy link
Member

@airween airween commented Sep 28, 2024

There is a bug report in e-mail (via mailing list), where the reporter explained the situation: if he uses Tlf on two nodes then when he enter a QSO the receiver node exists with SEGFAULT.

The problem is that the function parse_qso() is called two times, and it uses the char *buffer variable directly. When the function is called first time, the used strtok_r() chain "eats" the buffer, and at the second call it uses an empty buffer.

Here are the traces:

  • 1st call
    • background_process.c:165
    • log_to_disk.c:121
    • log_utils.c:87
  • 2nd call
    • log_to_disk.c:123
    • addcall.c:233
    • log_utils.c:87

Both calls are necessary for a complete log, so I think the best solution is to copy the original buffer and operate with that.

@airween airween requested a review from dl1jbe September 28, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant