1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-07 11:26:09 -04:00
Commit Graph

11244 Commits

Author SHA1 Message Date
Jon Beniston 9dfd11b2f5 Use latest settings when forced. 2026-07-30 22:56:44 +01:00
Jon Beniston 26f18e7402 Support OpenSky OAuth authentication. 2026-07-30 18:59:01 +01:00
Jon Beniston e27d41da1a Use stored mode-S identity. 2026-07-30 18:36:45 +01:00
Jon Beniston 703a1b6a29 Fix MSB of beast timestamp. 2026-07-30 18:30:32 +01:00
Jon Beniston 6287e4ac18 Add support for Mode-S short frames to Beast output 2026-07-30 18:29:54 +01:00
Jon Beniston 0e070d9881 Use latest settings when calculating interpolation filter 2026-07-30 18:29:18 +01:00
Jon Beniston a92c944c2c Fix opensky groundspeed and vertical rate. 2026-07-30 18:17:58 +01:00
Jon Beniston ea7571b31f m_exportServerPort is an int not a bool 2026-07-30 18:10:46 +01:00
Edouard Griffiths d91046b2f0 Merge pull request #2858 from rgetz/rgetz-fix-syntax-err
appbench, appsrv: Fix malformed QCoreApplication::applicationVersion()
2026-07-28 23:00:45 +02:00
Edouard Griffiths db89bd9b64 Merge pull request #2857 from rgetz/rgetz-cleanup-printf-format-specifiers
cleanup printf format specifiers
2026-07-28 13:11:21 +02:00
Robin Getz eaac5d032a appbench, appsrv: Fix malformed QCoreApplication::applicationVersion() call
Remove an inadvertent '>' character from the
QCoreApplication::applicationVersion() call in the startup version
logging for both appbench and appsrv.

This typo was identified by cppcheck during static analysis. Correcting
the expression restores valid C++ syntax, allowing the applications to
compile correctly and report their version information in the startup
log.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-27 20:30:34 -04:00
Edouard Griffiths 8064d990b1 Merge pull request #2856 from rgetz/rgetz-remove-warning-stringop-overflow
ft8: Fix CRC message length type causing memcpy overflow warning
2026-07-27 22:56:26 +02:00
Edouard Griffiths 82ce7487fb Merge pull request #2855 from rgetz/rgetz-fix-same-expression-on-both-sides
chirpchat: Fix FT8 message type 0.4 reply detection
2026-07-27 18:39:28 +02:00
Edouard Griffiths af3941dd23 Merge pull request #2854 from rgetz/rgetz-fix-win-com-port
serialutil: Remove dead code in Windows COM port enumeration
2026-07-27 13:34:09 +02:00
Edouard Griffiths a7969d1c8a Merge pull request #2852 from rgetz/rgetz-reduce-vlas-dvbs2
continue to reduce (eliminate) VLA usage from leansdr
2026-07-27 12:42:33 +02:00
Edouard Griffiths 6efccde2e3 Merge pull request #2851 from rgetz/rgetz-fix-incorrect-iterator
ADSB Demod: Fix incorrect iterator range when restoring column sizes
2026-07-27 11:56:44 +02:00
Edouard Griffiths 2dfcf88259 Merge pull request #2850 from rgetz/rgetz-fix-missing-copy-glscopesettings
GLScope: Fix missing freerun setting copy in assignment operator
2026-07-27 08:42:35 +02:00
Edouard Griffiths d23b91a6eb Merge pull request #2847 from srcejon/fix_2839
Fix Astronomy::azAltToXY85 when azimuth or elevation is 0.
2026-07-27 08:41:53 +02:00
Robin Getz 655841008e leansdr: Fix unsigned printf format specifiers
Replace signed %ld format specifiers with unsigned %lu conversions when
printing values stored as unsigned long.

The previous format strings passed unsigned values to signed printf
conversions, which could result in undefined behavior due to variadic
argument type mismatches. These issues were identified by cppcheck
invalidPrintfArgType_sint warnings.

Use format specifiers matching the actual argument types to ensure
correct and portable printf usage.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 18:43:36 -04:00
Robin Getz fff440527a plutosdr: Fix unsigned printf format warnings
Replace signed %d format specifiers with unsigned %u when formatting
sample rates and channel numbers.

The previous format strings passed unsigned int values to %d conversions,
which triggered cppcheck invalidPrintfArgType_sint warnings and could
result in undefined behavior due to variadic argument type mismatches.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 18:38:32 -04:00
Robin Getz d44a953cfa ft8: Fix CRC message length type causing memcpy overflow warning
Change the ft8_crc message length parameter from signed int to uint32_t
since it represents a non-negative FT8 message bit count.

GCC reported a potential buffer overflow in the memcpy() call:
    warning: ‘__builtin_memcpy’ specified bound between
    18446744073709551560 and 18446744073709551564 exceeds maximum object size
    [-Wstringop-overflow=]

The warning was caused by the signed message length allowing negative
values to be converted into a very large unsigned size when calculating
the memcpy() byte count.

Using an unsigned fixed-width type better represents the valid range of
the FT8 message length and prevents invalid negative lengths from being
interpreted as extremely large memory operations.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 18:22:04 -04:00
Robin Getz b6c9ed2057 chirpchat: Fix FT8 message type 0.4 reply detection
Fix a copy/paste error in decodeSymbols() where FT8 message type
0.3 was checked twice, preventing type 0.4 messages from being
recognized as replies.

FT8::Packing supports both 0.3 and 0.4 message types using the same
reply bit location.

Detected by cppcheck as a redundant condition.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 16:46:11 -04:00
Robin Getz 52f5055ef7 serialutil: Remove dead code in Windows COM port enumeration
Remove an invalid out-of-bounds array access that attempted to handle
ERROR_INSUFFICIENT_BUFFER. The statement did not resize the fixed-size
buffer and had no effect other than invoking undefined behavior.

The function only uses QueryDosDeviceA() as an existence check for COM
ports, so removing the dead error-handling code does not change its
behavior.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 15:54:53 -04:00
Edouard Griffiths 7675cb3e4c Merge pull request #2846 from rgetz/rgetz-fix-uninitialized-variable-ft8
FT8/FT4: Remove uninitialized value warnings
2026-07-26 21:54:10 +02:00
Edouard Griffiths 7ade66e467 Merge pull request #2845 from rgetz/rgetz-fix-boolean-bitwise
Fix UDP port validation boolean operations
2026-07-26 21:40:09 +02:00
Robin Getz f57e6d3568 DATV: Replace DVB-S2 pilot VLA buffers with std::vector
Replace variable-length arrays used for DVB-S2 pilot symbol matching with
std::vector allocations.

Use vector::data() when passing buffers to the existing pointer-based
match_ph_amp() function. This removes non-standard VLA usage and improves
C++ portability without changing behavior.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 14:54:12 -04:00
Robin Getz def0a877db DATV: Replace DVB-S2 pilot VLA buffers with std::vector
Replace variable-length arrays used for DVB-S2 pilot symbol matching with
std::vector allocations.

Use vector::data() when passing buffers to the existing pointer-based
match_ph_amp() function. This removes additional non-standard VLA usage and
improves C++ portability without changing behavior.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 14:50:25 -04:00
Robin Getz 1e72e94bb5 DATV: Replace DVB-S2 SOF VLA buffer with std::vector
Replace the variable-length array used for SOF symbol buffering in the
DVB-S2 frame receiver with a std::vector allocation.

Use vector::data() when passing the buffer to the existing pointer-based
conjugate product function. This removes another non-standard VLA usage and
improves C++ portability without changing behavior.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 14:45:38 -04:00
Robin Getz 16ab693062 DATV: Replace DVB-S2 VLA buffers with std::vector
Replace non-standard variable-length arrays used for PLHEADER symbol
processing with std::vector allocations. Update buffer copies and pointer
interfaces accordingly while preserving existing behavior.

This removes VLA compiler/static analysis warnings and improves C++
portability.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 14:38:53 -04:00
Robin Getz 60dbed7fc3 dvbs2.h : remove tabs, replace with spaces
to match style

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 14:33:38 -04:00
Edouard Griffiths 38a665f16f Merge pull request #2849 from srcejon/fix_2848
Attempt to fix debian build
2026-07-26 20:22:48 +02:00
Edouard Griffiths 31197025b4 Merge pull request #2844 from rgetz/rgetz-fix-testmi
testmi: Fix missing m_title copy in TestMISettings
2026-07-26 20:21:35 +02:00
Robin Getz 66d28efcc1 ADSB Demod: Fix incorrect iterator range when restoring column sizes
cppcheck reported that the std::copy() call used iterators from different
containers when restoring ADSB demod table column sizes.

The copy operation used settings.m_columnSizes as the source start iterator
but settings.m_columnIndexes as the source end iterator. This was likely a
copy/paste error and resulted in an invalid iterator range.

Use settings.m_columnSizes for both source iterators so column size settings
are restored correctly.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 13:44:02 -04:00
Robin Getz 3657fc1532 GLScope: Fix missing freerun setting copy in assignment operator
cppcheck reported that GLScopeSettings::operator=() did not assign the
m_freerun member variable.

m_freerun is part of the GLScope configuration state: it is initialized
in resetToDefaults(), and is persisted through serialize()/deserialize().
However, when a GLScopeSettings object was copied using the assignment
operator, the freerun state was not transferred from the source object.

This could result in two GLScopeSettings instances having different
freerun values after assignment, with the destination object retaining
its previous value instead of matching the source object.

Add the missing m_freerun assignment to ensure operator=() performs a
complete copy of the settings state and matches the existing
serialization behavior.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-26 13:28:46 -04:00
Edouard Griffiths b1e685b71c Merge pull request #2843 from rgetz/rgetz-fix-index-used-before-check
wdsp: Prevent potential out-of-bounds array access
2026-07-26 15:40:15 +02:00
Jon Beniston ab8c127a4a Fix sed script on Linux. Also fix new flatbuffer build on linux 2026-07-26 13:47:30 +01:00
Edouard Griffiths e01381996d Merge pull request #2842 from rgetz/rgetz-leansdr-fail-fatal
DATV: Convert leansdr fail and fatal errors into C++ exceptions
2026-07-26 13:30:01 +02:00
Edouard Griffiths 148ca3870e Merge pull request #2841 from rgetz/rgetz-reduce-vla-ldpctool-algorithms
step2 : reduce vlas
2026-07-26 09:59:50 +02:00
Edouard Griffiths 9306940671 Merge pull request #2840 from rgetz/rgetz-reduce-vla-leansdr
step 1 : reduce vla usage
2026-07-26 06:47:44 +02:00
Jon Beniston 82fe3fbfe9 Fix Astronomy::azAltToXY85 when azimuth or elevation is 0. #2839 2026-07-26 02:09:56 +01:00
Robin Getz 9b3e3e1865 FT8/FT4: Remove uninitialized value warnings
Fix cppcheck warnings about uninitialized mx variables in coarse
strength and soft symbol conversion calculations.

Replace the mxi sentinel logic with an explicit -infinity initial
maximum value, allowing the maximum search to operate directly on the
value being tracked. This removes reliance on short-circuit evaluation
for initialization and simplifies the code.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 20:27:17 -04:00
Robin Getz 0ee3237db5 Fix UDP port validation boolean operations
cppcheck reported boolean expressions being used in bitwise operations
when validating UDP ports. Replace accidental '&' operators with logical
'&&' operators.

Also replace hard-coded port range limits with UINT16_MAX to make the
valid UDP port range explicit and keep UDP source/sink validation
consistent.

No functional change.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 20:11:59 -04:00
Robin Getz 5c359aa0a4 testmi: Fix missing m_title copy in TestMISettings
cppcheck reported that the TestMISettings copy constructor did not
initialize member variable m_title:
  Member variable 'TestMISettings::m_title' is not assigned in the copy
  constructor. Should it be copied?

m_title is part of the serialized settings state, so ensure copied
TestMISettings instances preserve the configured title value.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 19:51:39 -04:00
Robin Getz 665f5e77ad wdsp: Prevent potential out-of-bounds array access
Fix cppcheck warnings where array elements were accessed before validating
their indices. Reorder conditional expressions to ensure bounds checks are
performed before array accesses, taking advantage of C++ short-circuit
evaluation.

In EMNR::NP::interpM(), check the index limit before accessing xvals[idx].
In SNBA::scanFrame(), verify i is within the merit array bounds before
evaluating merit[i].

These changes improve defensive programming practices and prevent potential
undefined behavior if an index exceeds the valid range. No functional changes.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 19:30:38 -04:00
Robin Getz e86e95feab DATV: Convert leansdr fail and fatal errors into C++ exceptions
The original leansdr code uses fatal() and fail() for unrecoverable errors by
terminating execution. When integrated into SDRangel, these error paths did
not provide a mechanism for the plugin to handle failures locally, allowing
initialization failures to escape the normal plugin lifecycle.

Convert leansdr fatal() and fail() handling into C++ exceptions so DATV can
detect framework initialization failures, report them, and cleanly return
control to SDRangel instead of allowing the error to terminate the application.
This behavior is desirable because a DATV framework configuration failure
should not bring down the entire application.

Catch initialization exceptions in DATVDemodSink::feed(), report the failure,
clean up the partially initialized framework, and return to the caller.

Add noreturn annotations to the leansdr error functions and include the
leansdr source in exception messages to make failures easier to diagnose.

This does not redesign leansdr error handling or provide recovery from
runtime DSP failures. It only adds an exception boundary between the
leansdr library code and the SDRangel plugin lifecycle.

noticed via cppcheck indicating many Array indexes could go out of bounds
due to fail and fatal returning.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 18:50:40 -04:00
Robin Getz 1772ff5ecb demoddatv: Replace MinSumAlgorithm int8 VLA with std::vector
Replace the runtime-sized temporary array in the int8_t specialization of
MinSumAlgorithm::finalp() with std::vector.

The array size is determined by the runtime value of cnt, requiring a
compiler VLA extension. Using std::vector preserves the existing behavior
while removing the dependency on non-standard language extensions.

This eliminates remaining -Wvla warnings (for me) reported from
ldpctool/algorithms.h

Part of #2830

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 16:45:07 -04:00
Robin Getz ef54a1ef6c demoddatv: Replace MinSumCAlgorithm VLA with std::vector
Replace the runtime-sized temporary array in
MinSumCAlgorithm::finalp() with std::vector.

The temporary array size depends on the runtime value of cnt, requiring a
compiler VLA extension. Using std::vector preserves the existing behavior
while removing the dependency on non-standard language extensions.

This eliminates ~6 of remaining -Wvla warnings (for me) reported
from ldpctool/algorithms.h

Part of #2830

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 16:44:58 -04:00
Robin Getz 144d40475b demoddatv: Replace OffsetMinSumAlgorithm int8 VLA with std::vector
Replace the runtime-sized temporary array in the int8_t specialization of
OffsetMinSumAlgorithm::finalp() with std::vector.

The array size is determined by the runtime value of cnt, requiring a
compiler VLA extension. Using std::vector preserves the existing behavior
while removing the dependency on non-standard language extensions.

This eliminates ~12 of remaining -Wvla warnings (for me) reported
from ldpctool/algorithms.h

Part of #2830

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 16:39:31 -04:00
Robin Getz a10746a22a demoddatv: Replace OffsetMinSumAlgorithm VLAs with std::vector
Replace the runtime-sized temporary arrays in
OffsetMinSumAlgorithm::finalp() with std::vector.

The array sizes depend on the runtime value of cnt, requiring compiler
support for variable length arrays. Using std::vector removes this
non-standard extension while preserving the existing algorithm and memory
layout.

This eliminates ~24 of remaining -Wvla warnings (for me) reported
from ldpctool/algorithms.h.

Part of #2830

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 16:39:31 -04:00
Robin Getz 463daf7eed demoddatv: Replace MinSumAlgorithm VLAs with std::vector
Replace the runtime-sized temporary arrays used by
MinSumAlgorithm<SIMD<...>>::finalp() with std::vector.

The array sizes are determined at runtime from the number of links,
making them variable-length arrays that rely on compiler extensions.
Using std::vector removes the dependency on VLA support while
preserving the existing algorithm and behavior.

This eliminates ~24 of remaining -Wvla warnings (for me) reported
from ldpctool/algorithms.h.

Part of #2830

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-25 16:39:23 -04:00