mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-07-26 20:14:19 -04:00
Merge pull request #2843 from rgetz/rgetz-fix-index-used-before-check
wdsp: Prevent potential out-of-bounds array access
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ void EMNR::NP::interpM (
|
||||
double xlhigh;
|
||||
double frac;
|
||||
|
||||
while ((x >= xvals[idx]) && (idx < nvals - 1))
|
||||
while ((idx < nvals - 1) && (x >= xvals[idx]))
|
||||
idx++;
|
||||
|
||||
xllow = log10 (xvals[idx - 1]);
|
||||
|
||||
+1
-1
@@ -620,7 +620,7 @@ int SNBA::scanFrame(
|
||||
|
||||
if (nimp > 0)
|
||||
{
|
||||
while (merit[i] == merit[0] && i < nimp)
|
||||
while (i < nimp && merit[i] == merit[0])
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user