tuner_r820t: check if Nint is within allowed range

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Steve Markgraf 12 years ago
parent 105e77c5d9
commit c179f860d5
  1. 5
      src/tuner_r820t.c

@ -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…
Cancel
Save