Share directly executed tests and generated wrappers between Automake primaries. Keep entries one per line to reduce conflicts when independent changes add coverage.
The Dummy backend retained caller-owned string pointers in its parameter
array, leaving BANDSELECT and KEYERTYPE dangling after the caller returned.
Deep-copy string parameters, release replacements during cleanup, and add
set/get ownership regressions for both string-valued parameters.
Stop parsing when an escape is missing or consumes no input, and count only successfully decoded bytes. This avoids the extra strtol call beyond the command terminator while preserving valid raw commands.
Require the response command, VFO selector, numeric payload, and terminator to match the requested S-meter frame. Reject malformed or mismatched replies without changing the output value.
Band-name callers treat successful lookups as printable strings. Return BANDGEN when granularity metadata has no band list instead of propagating NULL into formatting paths.
to_hex() left non-empty destination buffers untouched when the source
length was zero. Initialize the output string before returning and cover
the empty conversion in testbcd.
Stop binary command decoding at the documented escape boundary and use the conversion endpoint to advance. This avoids reading beyond a terminated command while preserving valid escaped bytes.
Exercise command stream failures, hexadecimal byte formats, backend truncation and framing, metadata absence, and physical-device reply boundaries with focused valid and malformed cases. Ignore the generated test binaries and harness logs.
Reject stream read errors instead of synthesizing empty commands, validate raw hexadecimal command syntax without reading past its terminator, and keep fixed-size command and description inputs within their actual capacities.
NET rigctl and Quisk reused an old loop index while parsing
peer-provided AGC levels, which could write past the fixed array.
Use a shared bounded parser that truncates the list to the array
capacity and ignores malformed fields without failing the connection.
Fixes: 652e12a446 ("Fix cppcheck style")
Concurrent calls to rig_debug() could use the same temporary buffer
and corrupt the saved debug history.
Give each call its own buffer and update the shared history under the
existing mutex.
glibc implements some new parts of the C23 standard:
(Taken from https://download.opensuse.org/tumbleweed/iso/Changes.20260430.txt)
* For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return
pointers into their input arrays now have definitions as macros that
return a pointer to a const-qualified type when the input argument is
a pointer to a const-qualified type
and
* The aforementioned change in ISO C23 of the declaration of bsearch,
memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr,
wcsstr, and wmemchr as const-preserving macros can lead to compilation
issues in code not set up for it
This lead to some warnings about assigning returns from strchr(const, target)
to non-const pointers, and then discovering that Hamlib was modifying
those const parameters.
This commit aligns the const-ness of the offending parameters. Only affects
internal functions in ampctl_parse.c, rigctl_parse.c and rotctl_parse.c,
so API/ABI should not change.
gcc-16 adds warnings about using strncpy() to copy into a buffer with
size equal to the max count, possibly creating an unterminated string.
Since we don't care about the contents here and both buffers are the
same size, just do a byte copy.
Allocate and free it.
For access apps must
1) #include <hamlib/rig_state.h> and
2) Use HAMLIB_STATE(rig) to get the address
Also fix a couple of misuses of STATE() macro.
Add new amp_caps fields (funcs, levels, parms, ops, status, freq ranges, input/ant)
with corresponding frontend API functions, ampctl commands, and dumpcaps
support. Implement Expert 13K-FA/15K-FA/2K-FA amplifier backend. Extend
dummy backend with full coverage of all new API features.
The utility requires eight arguments but #3, baud, is ignored which
seems to leave it broken and has been ignored for about as long as the
code has been in the repository. There is also no documentation on the
intended usage of this utility.
Will restore when these issues are resolved.
Just started playing with valgrind, and already We have a Winner!
rigctld was leaking ~100 bytes every 5 seconds; rearrange code so
arg is not allocated until it is needed and will be passed to the
routine that will free() it.
Also fix uninitialized variable warning.
All letters are used now, rig_set/rig_get are added and -W is
reserved by POSIX.2 for implementation extensions of get_opt,
but it doesn't apply here because this code is using strcmp()
and the W command which is implemented is not prefixed by a '-'.