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

power2mW buffer overflow #855

Closed
mikaelnousiainen opened this issue Nov 7, 2021 · 1 comment
Closed

power2mW buffer overflow #855

mikaelnousiainen opened this issue Nov 7, 2021 · 1 comment

Comments

@mikaelnousiainen
Copy link
Contributor

I saw this issue described in a tweet: https://twitter.com/JeffSipek/status/1457167104600383488

Here's the content:

TIL that hamlib uses sprintf in its netrigctl code. If I try to get the power (via rig_power2mW) and specify a frequency with more than 7 decimal digits (IOW >9.999999 MHz), it overflows the command buffer. macOS catches this somehow and kills the process

The format string is:

“\power2mW %f %.0f %s\n”

The first %f produces: 0.250000
The second: 14230000
The %s: USB

For a total of 32 bytes written to a: char cmdbuf[32];

@mdblack98
Copy link
Contributor

Fixed

foldynl added a commit to foldynl/QLog that referenced this issue Apr 12, 2022
due to a hamlib issue #855 (Hamlib/Hamlib#855)
get PWR Rig function is disabled for hamlib versions 4.2 and 4.3
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

No branches or pull requests

2 participants