mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-12-25 02:18:29 +01:00
tuner_r820t: check if Nint is within allowed range
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
105e77c5d9
commit
c179f860d5
@ -1473,6 +1473,11 @@ R828_ErrCode R828_PLL(void *pTuner, UINT32 LO_Freq, R828_Standard_Type R828_Stan
|
||||
else
|
||||
VCO_Fra = VCO_Fra;
|
||||
|
||||
if (Nint > 63) {
|
||||
fprintf(stderr, "[R820T] No valid PLL values for %u Hz!\n", LO_Freq);
|
||||
return RT_Fail;
|
||||
}
|
||||
|
||||
//N & S
|
||||
Ni = (Nint - 13) / 4;
|
||||
Si = Nint - 4 *Ni - 13;
|
||||
|
Loading…
Reference in New Issue
Block a user